From 6bcf81175176803729c87997d1594fc30f758d84 Mon Sep 17 00:00:00 2001 From: vitaliizazmic <75620293+vitaliizazmic@users.noreply.github.com> Date: Tue, 10 Aug 2021 21:21:39 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Source=20Quickbooks:=20use=20num?= =?UTF-8?q?ber=20data=20type=20for=20decimal=20fields?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Source Quickbooks #4292 - migrate to Airbyte CDK * Source Quickbooks #4292 - use singer tap fork * Source Quickbooks #4292 - remove requirements.txt * Source Quickbooks #4292 - enable SAT except incremental test * Source Quickbooks #4292 - remove unnecessary files * Source Quickbooks #4292 - update cursor_field * Source Quickbooks #4292 - commented out incremental test * Source Quickbooks #4292 - enable incremental test * Source Quickbooks #4292 - fix build.gradle and acceptance-test-docker.sh * Source Quickbooks #4292 - update fork repo * Source Quickbooks #4292 - bump version --- .../29b409d9-30a5-4cc8-ad50-886eb846fea3.json | 2 +- .../resources/seed/source_definitions.yaml | 2 +- .../source-quickbooks-singer/.dockerignore | 1 + .../source-quickbooks-singer/Dockerfile | 17 +- .../acceptance-test-config.yml | 53 + .../acceptance-test-docker.sh | 15 + .../source-quickbooks-singer/build.gradle | 12 +- .../integration_tests/__init__.py | 0 .../integration_tests/abnormal_state.json | 88 + .../integration_tests/acceptance.py | 34 + .../integration_tests/configured_catalog.json | 340 ++ .../integration_tests/invalid_config.json | 9 + .../sample_state.json | 0 .../{main_dev.py => main.py} | 2 +- .../source-quickbooks-singer/requirements.txt | 5 +- .../sample_files/configured_catalog.json | 4594 ----------------- .../source-quickbooks-singer/setup.py | 15 +- .../source_quickbooks_singer/source.py | 42 +- docs/integrations/sources/quickbooks.md | 1 + 19 files changed, 589 insertions(+), 4643 deletions(-) create mode 100644 airbyte-integrations/connectors/source-quickbooks-singer/acceptance-test-config.yml create mode 100644 airbyte-integrations/connectors/source-quickbooks-singer/acceptance-test-docker.sh create mode 100644 airbyte-integrations/connectors/source-quickbooks-singer/integration_tests/__init__.py create mode 100644 airbyte-integrations/connectors/source-quickbooks-singer/integration_tests/abnormal_state.json create mode 100644 airbyte-integrations/connectors/source-quickbooks-singer/integration_tests/acceptance.py create mode 100644 airbyte-integrations/connectors/source-quickbooks-singer/integration_tests/configured_catalog.json create mode 100644 airbyte-integrations/connectors/source-quickbooks-singer/integration_tests/invalid_config.json rename airbyte-integrations/connectors/source-quickbooks-singer/{sample_files => integration_tests}/sample_state.json (100%) rename airbyte-integrations/connectors/source-quickbooks-singer/{main_dev.py => main.py} (96%) delete mode 100644 airbyte-integrations/connectors/source-quickbooks-singer/sample_files/configured_catalog.json diff --git a/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/29b409d9-30a5-4cc8-ad50-886eb846fea3.json b/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/29b409d9-30a5-4cc8-ad50-886eb846fea3.json index 9be89044205e2..1d198b831a086 100644 --- a/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/29b409d9-30a5-4cc8-ad50-886eb846fea3.json +++ b/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/29b409d9-30a5-4cc8-ad50-886eb846fea3.json @@ -2,6 +2,6 @@ "sourceDefinitionId": "29b409d9-30a5-4cc8-ad50-886eb846fea3", "name": "Quickbooks", "dockerRepository": "airbyte/source-quickbooks-singer", - "dockerImageTag": "0.1.2", + "dockerImageTag": "0.1.3", "documentationUrl": "https://docs.airbyte.io/integrations/sources/quickbooks" } diff --git a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml index 74b0249cc4532..d0b806cb79ef0 100644 --- a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml @@ -294,7 +294,7 @@ - sourceDefinitionId: 29b409d9-30a5-4cc8-ad50-886eb846fea3 name: Quickbooks dockerRepository: airbyte/source-quickbooks-singer - dockerImageTag: 0.1.2 + dockerImageTag: 0.1.3 documentationUrl: https://docs.airbyte.io/integrations/sources/quickbooks - sourceDefinitionId: 2e875208-0c0b-4ee4-9e92-1cb3156ea799 name: Iterable diff --git a/airbyte-integrations/connectors/source-quickbooks-singer/.dockerignore b/airbyte-integrations/connectors/source-quickbooks-singer/.dockerignore index 3c31f61a57e09..bdae00e092317 100644 --- a/airbyte-integrations/connectors/source-quickbooks-singer/.dockerignore +++ b/airbyte-integrations/connectors/source-quickbooks-singer/.dockerignore @@ -1,6 +1,7 @@ * !Dockerfile !Dockerfile.test +!main.py !source_quickbooks_singer !setup.py !secrets diff --git a/airbyte-integrations/connectors/source-quickbooks-singer/Dockerfile b/airbyte-integrations/connectors/source-quickbooks-singer/Dockerfile index c6d25638085dd..f529cc12baad4 100644 --- a/airbyte-integrations/connectors/source-quickbooks-singer/Dockerfile +++ b/airbyte-integrations/connectors/source-quickbooks-singer/Dockerfile @@ -1,17 +1,16 @@ -FROM airbyte/integration-base-singer:0.1.1 +FROM python:3.7-slim # Bash is installed for more convenient debugging. -RUN apt-get update && apt-get install -y bash -y gcc && rm -rf /var/lib/apt/lists/* - -ENV CODE_PATH="source_quickbooks_singer" -ENV AIRBYTE_IMPL_MODULE="source_quickbooks_singer" -ENV AIRBYTE_IMPL_PATH="SourceQuickbooksSinger" -ENV AIRBYTE_ENTRYPOINT "/airbyte/base.sh" +RUN apt-get update && apt-get install -y bash && apt-get install -y gcc && rm -rf /var/lib/apt/lists/* WORKDIR /airbyte/integration_code -COPY $CODE_PATH ./$CODE_PATH +COPY source_quickbooks_singer ./source_quickbooks_singer +COPY main.py ./ COPY setup.py ./ RUN pip install . -LABEL io.airbyte.version=0.1.2 +ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py" +ENTRYPOINT ["python", "/airbyte/integration_code/main.py"] + +LABEL io.airbyte.version=0.1.3 LABEL io.airbyte.name=airbyte/source-quickbooks-singer diff --git a/airbyte-integrations/connectors/source-quickbooks-singer/acceptance-test-config.yml b/airbyte-integrations/connectors/source-quickbooks-singer/acceptance-test-config.yml new file mode 100644 index 0000000000000..ad63f2c7a1607 --- /dev/null +++ b/airbyte-integrations/connectors/source-quickbooks-singer/acceptance-test-config.yml @@ -0,0 +1,53 @@ +# See [Source Acceptance Tests](https://docs.airbyte.io/contributing-to-airbyte/building-new-connector/source-acceptance-tests.md) +# for more information about how to configure these tests +connector_image: airbyte/source-quickbooks-singer:dev +tests: + spec: + - spec_path: "source_quickbooks_singer/spec.json" + connection: + - config_path: "secrets/config.json" + status: "succeed" + - config_path: "integration_tests/invalid_config.json" + status: "failed" + discovery: + - config_path: "secrets/config.json" + basic_read: + - config_path: "secrets/config.json" + configured_catalog_path: "integration_tests/configured_catalog.json" + empty_streams: ["budgets", "classes", "departments", "payment_methods", "transfers", "vendor_credits"] + incremental: + - config_path: "secrets/config.json" + configured_catalog_path: "integration_tests/configured_catalog.json" + future_state_path: "integration_tests/abnormal_state.json" + cursor_paths: + accounts: [ "bookmarks", "accounts", "LastUpdatedTime"] + bill_payments: [ "bookmarks", "bill_payments", "LastUpdatedTime"] + bills: [ "bookmarks", "bills", "LastUpdatedTime"] + budgets: [ "bookmarks", "budgets", "LastUpdatedTime"] + classes: [ "bookmarks", "classes", "LastUpdatedTime"] + credit_memos: [ "bookmarks", "credit_memos", "LastUpdatedTime"] + customers: [ "bookmarks", "customers", "LastUpdatedTime"] + departments: [ "bookmarks", "departments", "LastUpdatedTime"] + deposits: [ "bookmarks", "deposits", "LastUpdatedTime"] + employees: [ "bookmarks", "employees", "LastUpdatedTime"] + estimates: [ "bookmarks", "estimates", "LastUpdatedTime"] + invoices: [ "bookmarks", "invoices", "LastUpdatedTime"] + items: [ "bookmarks", "items", "LastUpdatedTime"] + journal_entries: [ "bookmarks", "journal_entries", "LastUpdatedTime"] + payment_methods: [ "bookmarks", "payment_methods", "LastUpdatedTime"] + payments: [ "bookmarks", "payments", "LastUpdatedTime"] + purchase_orders: [ "bookmarks", "purchase_orders", "LastUpdatedTime"] + purchases: [ "bookmarks", "purchases", "LastUpdatedTime"] + refund_receipts: [ "bookmarks", "refund_receipts", "LastUpdatedTime"] + sales_receipts: [ "bookmarks", "sales_receipts", "LastUpdatedTime"] + tax_agencies: [ "bookmarks", "tax_agencies", "LastUpdatedTime"] + tax_codes: [ "bookmarks", "tax_codes", "LastUpdatedTime"] + tax_rates: [ "bookmarks", "tax_rates", "LastUpdatedTime"] + terms: [ "bookmarks", "terms", "LastUpdatedTime"] + time_activities: [ "bookmarks", "time_activities", "LastUpdatedTime"] + transfers: [ "bookmarks", "transfers", "LastUpdatedTime"] + vendor_credits: [ "bookmarks", "vendor_credits", "LastUpdatedTime"] + vendors: [ "bookmarks", "vendors", "LastUpdatedTime"] + full_refresh: + - config_path: "secrets/config.json" + configured_catalog_path: "integration_tests/configured_catalog.json" diff --git a/airbyte-integrations/connectors/source-quickbooks-singer/acceptance-test-docker.sh b/airbyte-integrations/connectors/source-quickbooks-singer/acceptance-test-docker.sh new file mode 100644 index 0000000000000..c522eebbd94e8 --- /dev/null +++ b/airbyte-integrations/connectors/source-quickbooks-singer/acceptance-test-docker.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env sh + +# Build latest connector image +docker build . -t $(cat acceptance-test-config.yml | grep "connector_image" | head -n 1 | cut -d: -f2) + +# Pull latest acctest image +docker pull airbyte/source-acceptance-test:latest + +# Run +docker run --rm -it \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -v /tmp:/tmp \ + -v $(pwd):/test_input \ + airbyte/source-acceptance-test \ + --acceptance-test-config /test_input diff --git a/airbyte-integrations/connectors/source-quickbooks-singer/build.gradle b/airbyte-integrations/connectors/source-quickbooks-singer/build.gradle index a528a28575deb..a716d8d702167 100644 --- a/airbyte-integrations/connectors/source-quickbooks-singer/build.gradle +++ b/airbyte-integrations/connectors/source-quickbooks-singer/build.gradle @@ -1,21 +1,13 @@ plugins { id 'airbyte-python' id 'airbyte-docker' - id 'airbyte-standard-source-test-file' + id 'airbyte-source-acceptance-test' } airbytePython { moduleDirectory 'source_quickbooks_singer' } -airbyteStandardSourceTestFile { - specPath = "source_quickbooks_singer/spec.json" - configPath = "secrets/config.json" - configuredCatalogPath = "sample_files/configured_catalog.json" -} - - dependencies { - implementation files(project(':airbyte-integrations:bases:base-standard-source-test-file').airbyteDocker.outputs) - implementation files(project(':airbyte-integrations:bases:base-singer').airbyteDocker.outputs) + implementation files(project(':airbyte-integrations:bases:source-acceptance-test').airbyteDocker.outputs) } diff --git a/airbyte-integrations/connectors/source-quickbooks-singer/integration_tests/__init__.py b/airbyte-integrations/connectors/source-quickbooks-singer/integration_tests/__init__.py new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/airbyte-integrations/connectors/source-quickbooks-singer/integration_tests/abnormal_state.json b/airbyte-integrations/connectors/source-quickbooks-singer/integration_tests/abnormal_state.json new file mode 100644 index 0000000000000..7189eda5fb304 --- /dev/null +++ b/airbyte-integrations/connectors/source-quickbooks-singer/integration_tests/abnormal_state.json @@ -0,0 +1,88 @@ +{ + "bookmarks": { + "accounts": { + "LastUpdatedTime": "2121-04-16T22:59:57-07:00" + }, + "bill_payments": { + "LastUpdatedTime": "2121-04-16T22:59:57-07:00" + }, + "bills": { + "LastUpdatedTime": "2121-04-16T22:59:57-07:00" + }, + "budgets": { + "LastUpdatedTime": "2121-04-16T22:59:57-07:00" + }, + "classes": { + "LastUpdatedTime": "2121-04-16T22:59:57-07:00" + }, + "credit_memos": { + "LastUpdatedTime": "2121-04-16T22:59:57-07:00" + }, + "customers": { + "LastUpdatedTime": "2121-04-16T22:59:57-07:00" + }, + "departments": { + "LastUpdatedTime": "2121-04-16T22:59:57-07:00" + }, + "deposits": { + "LastUpdatedTime": "2121-04-16T22:59:57-07:00" + }, + "employees": { + "LastUpdatedTime": "2121-04-16T22:59:57-07:00" + }, + "estimates": { + "LastUpdatedTime": "2121-04-16T22:59:57-07:00" + }, + "invoices": { + "LastUpdatedTime": "2121-04-16T22:59:57-07:00" + }, + "items": { + "LastUpdatedTime": "2121-04-16T22:59:57-07:00" + }, + "journal_entries": { + "LastUpdatedTime": "2121-04-16T22:59:57-07:00" + }, + "payment_methods": { + "LastUpdatedTime": "2121-04-16T22:59:57-07:00" + }, + "payments": { + "LastUpdatedTime": "2121-04-16T22:59:57-07:00" + }, + "purchase_orders": { + "LastUpdatedTime": "2121-04-16T22:59:57-07:00" + }, + "purchases": { + "LastUpdatedTime": "2121-04-16T22:59:57-07:00" + }, + "refund_receipts": { + "LastUpdatedTime": "2121-04-16T22:59:57-07:00" + }, + "sales_receipts": { + "LastUpdatedTime": "2121-04-16T22:59:57-07:00" + }, + "tax_agencies": { + "LastUpdatedTime": "2121-04-16T22:59:57-07:00" + }, + "tax_codes": { + "LastUpdatedTime": "2121-04-16T22:59:57-07:00" + }, + "tax_rates": { + "LastUpdatedTime": "2121-04-16T22:59:57-07:00" + }, + "terms": { + "LastUpdatedTime": "2121-04-16T22:59:57-07:00" + }, + "time_activities": { + "LastUpdatedTime": "2121-04-16T22:59:57-07:00" + }, + "transfers": { + "LastUpdatedTime": "2121-04-16T22:59:57-07:00" + }, + "vendor_credits": { + "LastUpdatedTime": "2121-04-16T22:59:57-07:00" + }, + "vendors": { + "LastUpdatedTime": "2121-04-16T22:59:57-07:00" + } + } +} diff --git a/airbyte-integrations/connectors/source-quickbooks-singer/integration_tests/acceptance.py b/airbyte-integrations/connectors/source-quickbooks-singer/integration_tests/acceptance.py new file mode 100644 index 0000000000000..d6cbdc97c495c --- /dev/null +++ b/airbyte-integrations/connectors/source-quickbooks-singer/integration_tests/acceptance.py @@ -0,0 +1,34 @@ +# +# MIT License +# +# Copyright (c) 2020 Airbyte +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# + + +import pytest + +pytest_plugins = ("source_acceptance_test.plugin",) + + +@pytest.fixture(scope="session", autouse=True) +def connector_setup(): + """ This fixture is a placeholder for external resources that acceptance test might require.""" + yield diff --git a/airbyte-integrations/connectors/source-quickbooks-singer/integration_tests/configured_catalog.json b/airbyte-integrations/connectors/source-quickbooks-singer/integration_tests/configured_catalog.json new file mode 100644 index 0000000000000..9c8ccb9607ebe --- /dev/null +++ b/airbyte-integrations/connectors/source-quickbooks-singer/integration_tests/configured_catalog.json @@ -0,0 +1,340 @@ +{ + "streams": [ + { + "stream": { + "name": "accounts", + "json_schema": {}, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["MetaData", "LastUpdatedTime"] + }, + "sync_mode": "incremental", + "cursor_field": ["MetaData", "LastUpdatedTime"], + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "bill_payments", + "json_schema": {}, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["MetaData", "LastUpdatedTime"] + }, + "sync_mode": "incremental", + "cursor_field": ["MetaData", "LastUpdatedTime"], + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "bills", + "json_schema": {}, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["MetaData", "LastUpdatedTime"] + }, + "sync_mode": "incremental", + "cursor_field": ["MetaData", "LastUpdatedTime"], + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "budgets", + "json_schema": {}, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["MetaData", "LastUpdatedTime"] + }, + "sync_mode": "incremental", + "cursor_field": ["MetaData", "LastUpdatedTime"], + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "classes", + "json_schema": {}, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["MetaData", "LastUpdatedTime"] + }, + "sync_mode": "incremental", + "cursor_field": ["MetaData", "LastUpdatedTime"], + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "credit_memos", + "json_schema": {}, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["MetaData", "LastUpdatedTime"] + }, + "sync_mode": "incremental", + "cursor_field": ["MetaData", "LastUpdatedTime"], + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "customers", + "json_schema": {}, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["MetaData", "LastUpdatedTime"] + }, + "sync_mode": "incremental", + "cursor_field": ["MetaData", "LastUpdatedTime"], + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "departments", + "json_schema": {}, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["MetaData", "LastUpdatedTime"] + }, + "sync_mode": "incremental", + "cursor_field": ["MetaData", "LastUpdatedTime"], + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "deposits", + "json_schema": {}, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["MetaData", "LastUpdatedTime"] + }, + "sync_mode": "incremental", + "cursor_field": ["MetaData", "LastUpdatedTime"], + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "employees", + "json_schema": {}, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["MetaData", "LastUpdatedTime"] + }, + "sync_mode": "incremental", + "cursor_field": ["MetaData", "LastUpdatedTime"], + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "estimates", + "json_schema": {}, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["MetaData", "LastUpdatedTime"] + }, + "sync_mode": "incremental", + "cursor_field": ["MetaData", "LastUpdatedTime"], + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "invoices", + "json_schema": {}, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["MetaData", "LastUpdatedTime"] + }, + "sync_mode": "incremental", + "cursor_field": ["MetaData", "LastUpdatedTime"], + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "items", + "json_schema": {}, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["MetaData", "LastUpdatedTime"] + }, + "sync_mode": "incremental", + "cursor_field": ["MetaData", "LastUpdatedTime"], + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "journal_entries", + "json_schema": {}, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["MetaData", "LastUpdatedTime"] + }, + "sync_mode": "incremental", + "cursor_field": ["MetaData", "LastUpdatedTime"], + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "payment_methods", + "json_schema": {}, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["MetaData", "LastUpdatedTime"] + }, + "sync_mode": "incremental", + "cursor_field": ["MetaData", "LastUpdatedTime"], + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "payments", + "json_schema": {}, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["MetaData", "LastUpdatedTime"] + }, + "sync_mode": "incremental", + "cursor_field": ["MetaData", "LastUpdatedTime"], + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "purchase_orders", + "json_schema": {}, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["MetaData", "LastUpdatedTime"] + }, + "sync_mode": "incremental", + "cursor_field": ["MetaData", "LastUpdatedTime"], + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "purchases", + "json_schema": {}, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["MetaData", "LastUpdatedTime"] + }, + "sync_mode": "incremental", + "cursor_field": ["MetaData", "LastUpdatedTime"], + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "refund_receipts", + "json_schema": {}, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["MetaData", "LastUpdatedTime"] + }, + "sync_mode": "incremental", + "cursor_field": ["MetaData", "LastUpdatedTime"], + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "sales_receipts", + "json_schema": {}, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["MetaData", "LastUpdatedTime"] + }, + "sync_mode": "incremental", + "cursor_field": ["MetaData", "LastUpdatedTime"], + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "tax_agencies", + "json_schema": {}, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["MetaData", "LastUpdatedTime"] + }, + "sync_mode": "incremental", + "cursor_field": ["MetaData", "LastUpdatedTime"], + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "tax_codes", + "json_schema": {}, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["MetaData", "LastUpdatedTime"] + }, + "sync_mode": "incremental", + "cursor_field": ["MetaData", "LastUpdatedTime"], + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "tax_rates", + "json_schema": {}, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["MetaData", "LastUpdatedTime"] + }, + "sync_mode": "incremental", + "cursor_field": ["MetaData", "LastUpdatedTime"], + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "terms", + "json_schema": {}, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["MetaData", "LastUpdatedTime"] + }, + "sync_mode": "incremental", + "cursor_field": ["MetaData", "LastUpdatedTime"], + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "time_activities", + "json_schema": {}, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["MetaData", "LastUpdatedTime"] + }, + "sync_mode": "incremental", + "cursor_field": ["MetaData", "LastUpdatedTime"], + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "transfers", + "json_schema": {}, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["MetaData", "LastUpdatedTime"] + }, + "sync_mode": "incremental", + "cursor_field": ["MetaData", "LastUpdatedTime"], + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "vendor_credits", + "json_schema": {}, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["MetaData", "LastUpdatedTime"] + }, + "sync_mode": "incremental", + "cursor_field": ["MetaData", "LastUpdatedTime"], + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "vendors", + "json_schema": {}, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["MetaData", "LastUpdatedTime"] + }, + "sync_mode": "incremental", + "cursor_field": ["MetaData", "LastUpdatedTime"], + "destination_sync_mode": "append" + } + ] +} diff --git a/airbyte-integrations/connectors/source-quickbooks-singer/integration_tests/invalid_config.json b/airbyte-integrations/connectors/source-quickbooks-singer/integration_tests/invalid_config.json new file mode 100644 index 0000000000000..bff145bc1e593 --- /dev/null +++ b/airbyte-integrations/connectors/source-quickbooks-singer/integration_tests/invalid_config.json @@ -0,0 +1,9 @@ +{ + "client_id": "", + "client_secret": "", + "refresh_token": "", + "realm_id": "", + "user_agent": "invalid invalid@invalid.com", + "start_date": "2021-01-01T00:00:00Z", + "sandbox": true +} diff --git a/airbyte-integrations/connectors/source-quickbooks-singer/sample_files/sample_state.json b/airbyte-integrations/connectors/source-quickbooks-singer/integration_tests/sample_state.json similarity index 100% rename from airbyte-integrations/connectors/source-quickbooks-singer/sample_files/sample_state.json rename to airbyte-integrations/connectors/source-quickbooks-singer/integration_tests/sample_state.json diff --git a/airbyte-integrations/connectors/source-quickbooks-singer/main_dev.py b/airbyte-integrations/connectors/source-quickbooks-singer/main.py similarity index 96% rename from airbyte-integrations/connectors/source-quickbooks-singer/main_dev.py rename to airbyte-integrations/connectors/source-quickbooks-singer/main.py index 3f89ccd1c2914..dd4f63edf8a93 100644 --- a/airbyte-integrations/connectors/source-quickbooks-singer/main_dev.py +++ b/airbyte-integrations/connectors/source-quickbooks-singer/main.py @@ -25,7 +25,7 @@ import sys -from base_python.entrypoint import launch +from airbyte_cdk.entrypoint import launch from source_quickbooks_singer import SourceQuickbooksSinger if __name__ == "__main__": diff --git a/airbyte-integrations/connectors/source-quickbooks-singer/requirements.txt b/airbyte-integrations/connectors/source-quickbooks-singer/requirements.txt index 484253df1dfae..7be17a56d745d 100644 --- a/airbyte-integrations/connectors/source-quickbooks-singer/requirements.txt +++ b/airbyte-integrations/connectors/source-quickbooks-singer/requirements.txt @@ -1,6 +1,3 @@ # This file is autogenerated -- only edit if you know what you are doing. Use setup.py for declaring dependencies. --e ../../bases/airbyte-protocol --e ../../bases/base-singer --e ../../bases/base-python --e ../../bases/base-python-test +-e ../../bases/source-acceptance-test -e . diff --git a/airbyte-integrations/connectors/source-quickbooks-singer/sample_files/configured_catalog.json b/airbyte-integrations/connectors/source-quickbooks-singer/sample_files/configured_catalog.json deleted file mode 100644 index 34935d827882f..0000000000000 --- a/airbyte-integrations/connectors/source-quickbooks-singer/sample_files/configured_catalog.json +++ /dev/null @@ -1,4594 +0,0 @@ -{ - "streams": [ - { - "stream": { - "name": "accounts", - "json_schema": { - "properties": { - "CurrentBalanceWithSubAccounts": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "AcctNum": { - "type": ["null", "string"] - }, - "AccountSubType": { - "type": ["null", "string"] - }, - "Classification": { - "type": ["null", "string"] - }, - "CurrencyRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Name": { - "type": ["null", "string"] - }, - "FullyQualifiedName": { - "type": ["null", "string"] - }, - "Id": { - "type": ["null", "string"] - }, - "AccountType": { - "type": ["null", "string"] - }, - "MetaData": { - "properties": { - "CreateTime": { - "format": "date-time", - "type": ["null", "string"] - }, - "LastUpdatedTime": { - "format": "date-time", - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "CurrentBalance": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "Active": { - "type": ["null", "boolean"] - }, - "domain": { - "type": ["null", "string"] - }, - "SubAccount": { - "type": ["null", "boolean"] - }, - "ParentRef": { - "properties": { - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "SyncToken": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["MetaData"] - }, - "sync_mode": "incremental", - "cursor_field": ["MetaData"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "bill_payments", - "json_schema": { - "properties": { - "APAccountRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "DepartmentRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "CheckPayment": { - "properties": { - "BankAccountRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "PrintStatus": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "CurrencyRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "TotalAmt": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "PayType": { - "type": ["null", "string"] - }, - "TxnDate": { - "format": "date-time", - "type": ["null", "string"] - }, - "Id": { - "type": ["null", "string"] - }, - "MetaData": { - "properties": { - "LastUpdatedTime": { - "format": "date-time", - "type": ["null", "string"] - }, - "CreateTime": { - "format": "date-time", - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "VendorRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "domain": { - "type": ["null", "string"] - }, - "CreditCardPayment": { - "properties": { - "CCAccountRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - } - }, - "type": ["null", "object"] - }, - "SyncToken": { - "type": ["null", "string"] - }, - "Line": { - "items": { - "properties": { - "Amount": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "LinkedTxn": { - "items": { - "properties": { - "TxnType": { - "type": ["null", "string"] - }, - "TxnId": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - }, - "DocNumber": { - "type": ["null", "string"] - }, - "ExchangeRate": { - "format": "singer.decimal", - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["MetaData"] - }, - "sync_mode": "incremental", - "cursor_field": ["MetaData"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "bills", - "json_schema": { - "properties": { - "SalesTermRef": { - "properties": { - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "LinkedTxn": { - "items": { - "properties": { - "TxnId": { - "type": ["null", "string"] - }, - "TxnType": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - }, - "DocNumber": { - "type": ["null", "string"] - }, - "CurrencyRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "SyncToken": { - "type": ["null", "string"] - }, - "Id": { - "type": ["null", "string"] - }, - "Balance": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "APAccountRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "DueDate": { - "format": "date-time", - "type": ["null", "string"] - }, - "MetaData": { - "properties": { - "CreateTime": { - "format": "date-time", - "type": ["null", "string"] - }, - "LastUpdatedTime": { - "format": "date-time", - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Line": { - "items": { - "properties": { - "Id": { - "type": ["null", "string"] - }, - "LineNum": { - "type": ["null", "integer"] - }, - "DetailType": { - "type": ["null", "string"] - }, - "Description": { - "type": ["null", "string"] - }, - "ItemBasedExpenseLineDetail": { - "properties": { - "ItemRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Qty": { - "type": ["null", "integer"] - }, - "TaxCodeRef": { - "properties": { - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "BillableStatus": { - "type": ["null", "string"] - }, - "UnitPrice": { - "type": ["null", "integer"] - } - }, - "type": ["null", "object"] - }, - "Amount": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "AccountBasedExpenseLineDetail": { - "properties": { - "BillableStatus": { - "type": ["null", "string"] - }, - "AccountRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "TaxCodeRef": { - "properties": { - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "CustomerRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - } - }, - "type": ["null", "object"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - }, - "domain": { - "type": ["null", "string"] - }, - "TxnDate": { - "format": "date-time", - "type": ["null", "string"] - }, - "VendorRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "TotalAmt": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "ExchangeRate": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "DepartmentRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "PrivateNote": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["MetaData"] - }, - "sync_mode": "incremental", - "cursor_field": ["MetaData"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "budgets", - "json_schema": { - "properties": { - "BudgetEntryType": { - "type": ["null", "string"] - }, - "Name": { - "type": ["null", "string"] - }, - "domain": { - "type": ["null", "string"] - }, - "Active": { - "type": ["null", "boolean"] - }, - "EndDate": { - "format": "date-time", - "type": ["null", "string"] - }, - "StartDate": { - "format": "date-time", - "type": ["null", "string"] - }, - "BudgetType": { - "type": ["null", "string"] - }, - "SyncToken": { - "type": ["null", "string"] - }, - "Id": { - "type": ["null", "string"] - }, - "BudgetDetail": { - "items": { - "properties": { - "ClassRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "DepartmentRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "CustomerRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "AccountRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "BudgetDate": { - "format": "date-time", - "type": ["null", "string"] - }, - "Amount": { - "format": "singer.decimal", - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - }, - "MetaData": { - "properties": { - "CreateTime": { - "format": "date-time", - "type": ["null", "string"] - }, - "LastUpdatedTime": { - "format": "date-time", - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - } - }, - "type": ["null", "object"] - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["MetaData"] - }, - "sync_mode": "incremental", - "cursor_field": ["MetaData"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "classes", - "json_schema": { - "properties": { - "ParentRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "SyncToken": { - "type": ["null", "string"] - }, - "domain": { - "type": ["null", "string"] - }, - "MetaData": { - "properties": { - "CreateTime": { - "format": "date-time", - "type": ["null", "string"] - }, - "LastUpdatedTime": { - "format": "date-time", - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Id": { - "type": ["null", "string"] - }, - "Name": { - "type": ["null", "string"] - }, - "SubClass": { - "type": ["null", "boolean"] - }, - "Active": { - "type": ["null", "boolean"] - }, - "FullyQualifiedName": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["MetaData"] - }, - "sync_mode": "incremental", - "cursor_field": ["MetaData"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "credit_memos", - "json_schema": { - "properties": { - "ClassRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "BillEmail": { - "properties": { - "Address": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "EmailStatus": { - "type": ["null", "string"] - }, - "DocNumber": { - "type": ["null", "string"] - }, - "Balance": { - "type": ["null", "integer"] - }, - "CustomerMemo": { - "properties": { - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "CurrencyRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "PrintStatus": { - "type": ["null", "string"] - }, - "SyncToken": { - "type": ["null", "string"] - }, - "Line": { - "items": { - "properties": { - "Amount": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "Description": { - "type": ["null", "string"] - }, - "Id": { - "type": ["null", "string"] - }, - "SalesItemLineDetail": { - "properties": { - "ItemRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "UnitPrice": { - "type": ["null", "integer"] - }, - "TaxCodeRef": { - "properties": { - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Qty": { - "type": ["null", "integer"] - } - }, - "type": ["null", "object"] - }, - "LineNum": { - "type": ["null", "integer"] - }, - "DetailType": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - }, - "TotalAmt": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "ApplyTaxAfterDiscount": { - "type": ["null", "boolean"] - }, - "domain": { - "type": ["null", "string"] - }, - "SalesTermRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "ShipAddr": { - "properties": { - "PostalCode": { - "type": ["null", "string"] - }, - "CountrySubDivisionCode": { - "type": ["null", "string"] - }, - "Id": { - "type": ["null", "string"] - }, - "Long": { - "type": ["null", "string"] - }, - "Lat": { - "type": ["null", "string"] - }, - "City": { - "type": ["null", "string"] - }, - "Line1": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "TxnTaxDetail": { - "properties": { - "TotalTax": { - "type": ["null", "integer"] - } - }, - "type": ["null", "object"] - }, - "TxnDate": { - "format": "date-time", - "type": ["null", "string"] - }, - "CustomField": { - "items": { - "properties": { - "Name": { - "type": ["null", "string"] - }, - "Type": { - "type": ["null", "string"] - }, - "DefinitionId": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - }, - "Id": { - "type": ["null", "string"] - }, - "BillAddr": { - "properties": { - "Line1": { - "type": ["null", "string"] - }, - "Id": { - "type": ["null", "string"] - }, - "Line3": { - "type": ["null", "string"] - }, - "Long": { - "type": ["null", "string"] - }, - "Line2": { - "type": ["null", "string"] - }, - "Line4": { - "type": ["null", "string"] - }, - "Lat": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "CustomerRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "RemainingCredit": { - "type": ["null", "integer"] - }, - "ExchangeRate": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "HomeTotalAmt": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "MetaData": { - "properties": { - "CreateTime": { - "format": "date-time", - "type": ["null", "string"] - }, - "LastUpdatedTime": { - "format": "date-time", - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "patternProperties": {} - }, - "type": ["null", "object"] - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["MetaData"] - }, - "sync_mode": "incremental", - "cursor_field": ["MetaData"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "customers", - "json_schema": { - "properties": { - "DefaultTaxCodeRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "SalesTermRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "PaymentMethodRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "ResaleNum": { - "type": ["null", "string"] - }, - "CurrencyRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "MiddleName": { - "type": ["null", "string"] - }, - "BillAddr": { - "properties": { - "Lat": { - "type": ["null", "string"] - }, - "Id": { - "type": ["null", "string"] - }, - "CountrySubDivisionCode": { - "type": ["null", "string"] - }, - "Country": { - "type": ["null", "string"] - }, - "City": { - "type": ["null", "string"] - }, - "Long": { - "type": ["null", "string"] - }, - "PostalCode": { - "type": ["null", "string"] - }, - "Line1": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "PrimaryEmailAddr": { - "properties": { - "Address": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Balance": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "CompanyName": { - "type": ["null", "string"] - }, - "FamilyName": { - "type": ["null", "string"] - }, - "FullyQualifiedName": { - "type": ["null", "string"] - }, - "PrimaryPhone": { - "properties": { - "FreeFormNumber": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "BalanceWithJobs": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "BillWithParent": { - "type": ["null", "boolean"] - }, - "Level": { - "type": ["null", "integer"] - }, - "ParentRef": { - "properties": { - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "PrintOnCheckName": { - "type": ["null", "string"] - }, - "Job": { - "type": ["null", "boolean"] - }, - "Mobile": { - "properties": { - "FreeFormNumber": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "PreferredDeliveryMethod": { - "type": ["null", "string"] - }, - "SyncToken": { - "type": ["null", "string"] - }, - "Taxable": { - "type": ["null", "boolean"] - }, - "DisplayName": { - "type": ["null", "string"] - }, - "MetaData": { - "properties": { - "CreateTime": { - "format": "date-time", - "type": ["null", "string"] - }, - "LastUpdatedTime": { - "format": "date-time", - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "WebAddr": { - "properties": { - "URI": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Id": { - "type": ["null", "string"] - }, - "domain": { - "type": ["null", "string"] - }, - "Active": { - "type": ["null", "boolean"] - }, - "GivenName": { - "type": ["null", "string"] - }, - "ShipAddr": { - "properties": { - "Lat": { - "type": ["null", "string"] - }, - "Id": { - "type": ["null", "string"] - }, - "CountrySubDivisionCode": { - "type": ["null", "string"] - }, - "Country": { - "type": ["null", "string"] - }, - "City": { - "type": ["null", "string"] - }, - "Long": { - "type": ["null", "string"] - }, - "PostalCode": { - "type": ["null", "string"] - }, - "Line1": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Fax": { - "properties": { - "FreeFormNumber": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - } - }, - "type": ["null", "object"] - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["MetaData"] - }, - "sync_mode": "incremental", - "cursor_field": ["MetaData"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "departments", - "json_schema": { - "properties": { - "ParentRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "MetaData": { - "properties": { - "LastUpdatedTime": { - "format": "date-time", - "type": ["null", "string"] - }, - "CreateTime": { - "format": "date-time", - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "FullyQualifiedName": { - "type": ["null", "string"] - }, - "Id": { - "type": ["null", "string"] - }, - "domain": { - "type": ["null", "string"] - }, - "Name": { - "type": ["null", "string"] - }, - "SyncToken": { - "type": ["null", "string"] - }, - "SubDepartment": { - "type": ["null", "boolean"] - }, - "Active": { - "type": ["null", "boolean"] - } - }, - "type": ["null", "object"] - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["MetaData"] - }, - "sync_mode": "incremental", - "cursor_field": ["MetaData"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "deposits", - "json_schema": { - "properties": { - "DepartmentRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "CurrencyRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "CashBack": { - "properties": { - "AccountRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Amount": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "Memo": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "SyncToken": { - "type": ["null", "string"] - }, - "Line": { - "items": { - "properties": { - "Id": { - "type": ["null", "string"] - }, - "LineNum": { - "type": ["null", "integer"] - }, - "DetailType": { - "type": ["null", "string"] - }, - "Amount": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "DepositLineDetail": { - "properties": { - "PaymentMethodRef": { - "properties": { - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "AccountRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "CheckNum": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "LinkedTxn": { - "items": { - "properties": { - "TxnLineId": { - "type": ["null", "string"] - }, - "TxnId": { - "type": ["null", "string"] - }, - "TxnType": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - }, - "MetaData": { - "properties": { - "CreateTime": { - "format": "date-time", - "type": ["null", "string"] - }, - "LastUpdatedTime": { - "format": "date-time", - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "DepositToAccountRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Id": { - "type": ["null", "string"] - }, - "domain": { - "type": ["null", "string"] - }, - "TxnDate": { - "format": "date-time", - "type": ["null", "string"] - }, - "TotalAmt": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "ExchangeRate": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "PrivateNote": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["MetaData"] - }, - "sync_mode": "incremental", - "cursor_field": ["MetaData"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "employees", - "json_schema": { - "properties": { - "HiredDate": { - "format": "date-time", - "type": ["null", "string"] - }, - "PrimaryPhone": { - "properties": { - "FreeFormNumber": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "SyncToken": { - "type": ["null", "string"] - }, - "BillableTime": { - "type": ["null", "boolean"] - }, - "DisplayName": { - "type": ["null", "string"] - }, - "GivenName": { - "type": ["null", "string"] - }, - "FamilyName": { - "type": ["null", "string"] - }, - "Id": { - "type": ["null", "string"] - }, - "domain": { - "type": ["null", "string"] - }, - "Active": { - "type": ["null", "boolean"] - }, - "BirthDate": { - "format": "date-time", - "type": ["null", "string"] - }, - "PrintOnCheckName": { - "type": ["null", "string"] - }, - "MetaData": { - "properties": { - "CreateTime": { - "format": "date-time", - "type": ["null", "string"] - }, - "LastUpdatedTime": { - "format": "date-time", - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - } - }, - "type": ["null", "object"] - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["MetaData"] - }, - "sync_mode": "incremental", - "cursor_field": ["MetaData"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "estimates", - "json_schema": { - "properties": { - "BillEmail": { - "properties": { - "Address": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "BillAddr": { - "properties": { - "Lat": { - "type": ["null", "string"] - }, - "Id": { - "type": ["null", "string"] - }, - "Line2": { - "type": ["null", "string"] - }, - "Line4": { - "type": ["null", "string"] - }, - "Line3": { - "type": ["null", "string"] - }, - "Line1": { - "type": ["null", "string"] - }, - "Long": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "TxnStatus": { - "type": ["null", "string"] - }, - "EmailStatus": { - "type": ["null", "string"] - }, - "MetaData": { - "properties": { - "CreateTime": { - "format": "date-time", - "type": ["null", "string"] - }, - "LastUpdatedTime": { - "format": "date-time", - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "TxnDate": { - "format": "date-time", - "type": ["null", "string"] - }, - "SyncToken": { - "type": ["null", "string"] - }, - "DocNumber": { - "type": ["null", "string"] - }, - "TotalAmt": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "CurrencyRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "CustomerRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "domain": { - "type": ["null", "string"] - }, - "Id": { - "type": ["null", "string"] - }, - "DeliveryInfo": { - "properties": { - "DeliveryType": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "TxnTaxDetail": { - "properties": { - "TotalTax": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "TaxLine": { - "items": { - "properties": { - "Amount": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "TaxLineDetail": { - "properties": { - "PercentBased": { - "type": ["null", "boolean"] - }, - "TaxPercent": { - "type": ["null", "integer"] - }, - "NetAmountTaxable": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "TaxRateRef": { - "properties": { - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - } - }, - "type": ["null", "object"] - }, - "DetailType": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - }, - "TxnTaxCodeRef": { - "properties": { - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - } - }, - "type": ["null", "object"] - }, - "LinkedTxn": { - "items": { - "properties": { - "TxnId": { - "type": ["null", "string"] - }, - "TxnType": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - }, - "CustomerMemo": { - "properties": { - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Line": { - "items": { - "properties": { - "Id": { - "type": ["null", "string"] - }, - "LineNum": { - "type": ["null", "integer"] - }, - "DetailType": { - "type": ["null", "string"] - }, - "Description": { - "type": ["null", "string"] - }, - "Amount": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "SalesItemLineDetail": { - "properties": { - "ItemRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Qty": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "TaxCodeRef": { - "properties": { - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "UnitPrice": { - "format": "singer.decimal", - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - }, - "ApplyTaxAfterDiscount": { - "type": ["null", "boolean"] - }, - "PrintStatus": { - "type": ["null", "string"] - }, - "CustomField": { - "items": { - "properties": { - "DefinitionId": { - "type": ["null", "string"] - }, - "Name": { - "type": ["null", "string"] - }, - "Type": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - }, - "ExchangeRate": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "HomeTotalAmt": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "ShipAddr": { - "properties": { - "Lat": { - "type": ["null", "string"] - }, - "Id": { - "type": ["null", "string"] - }, - "CountrySubDivisionCode": { - "type": ["null", "string"] - }, - "City": { - "type": ["null", "string"] - }, - "Long": { - "type": ["null", "string"] - }, - "PostalCode": { - "type": ["null", "string"] - }, - "Line1": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "patternProperties": {} - }, - "type": ["null", "object"] - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["MetaData"] - }, - "sync_mode": "incremental", - "cursor_field": ["MetaData"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "invoices", - "json_schema": { - "properties": { - "AllowOnlineACHPayment": { - "type": ["null", "boolean"] - }, - "CustomerRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "BillAddr": { - "properties": { - "CountrySubDivisionCode": { - "type": ["null", "string"] - }, - "City": { - "type": ["null", "string"] - }, - "Line3": { - "type": ["null", "string"] - }, - "Line2": { - "type": ["null", "string"] - }, - "Long": { - "type": ["null", "string"] - }, - "Lat": { - "type": ["null", "string"] - }, - "Line4": { - "type": ["null", "string"] - }, - "PostalCode": { - "type": ["null", "string"] - }, - "Id": { - "type": ["null", "string"] - }, - "Line1": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "DocNumber": { - "type": ["null", "string"] - }, - "CurrencyRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "SyncToken": { - "type": ["null", "string"] - }, - "DeliveryInfo": { - "properties": { - "DeliveryType": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "SalesTermRef": { - "properties": { - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "AllowIPNPayment": { - "type": ["null", "boolean"] - }, - "AllowOnlineCreditCardPayment": { - "type": ["null", "boolean"] - }, - "MetaData": { - "properties": { - "CreateTime": { - "format": "date-time", - "type": ["null", "string"] - }, - "LastUpdatedTime": { - "format": "date-time", - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "domain": { - "type": ["null", "string"] - }, - "CustomerMemo": { - "properties": { - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "CustomField": { - "items": { - "properties": { - "Type": { - "type": ["null", "string"] - }, - "Name": { - "type": ["null", "string"] - }, - "StringValue": { - "type": ["null", "string"] - }, - "DefinitionId": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - }, - "Balance": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "AllowOnlinePayment": { - "type": ["null", "boolean"] - }, - "DueDate": { - "format": "date-time", - "type": ["null", "string"] - }, - "TxnDate": { - "format": "date-time", - "type": ["null", "string"] - }, - "ExchangeRate": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "HomeTotalAmt": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "Line": { - "items": { - "properties": { - "LinkedTxn": { - "items": { - "properties": { - "TxnType": { - "type": ["null", "string"] - }, - "TxnId": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - }, - "DetailType": { - "type": ["null", "string"] - }, - "Amount": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "SalesItemLineDetail": { - "properties": { - "ClassRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "TaxCodeRef": { - "properties": { - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "UnitPrice": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "ServiceDate": { - "format": "date-time", - "type": ["null", "string"] - }, - "ItemRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Qty": { - "format": "singer.decimal", - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "LineNum": { - "type": ["null", "integer"] - }, - "DiscountLineDetail": { - "properties": { - "DiscountAccountRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "DiscountPercent": { - "type": ["null", "integer"] - }, - "PercentBased": { - "type": ["null", "boolean"] - } - }, - "type": ["null", "object"] - }, - "Description": { - "type": ["null", "string"] - }, - "Id": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - }, - "Id": { - "type": ["null", "string"] - }, - "TxnTaxDetail": { - "properties": { - "TotalTax": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "TaxLine": { - "items": { - "properties": { - "Amount": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "DetailType": { - "type": ["null", "string"] - }, - "TaxLineDetail": { - "properties": { - "NetAmountTaxable": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "TaxPercent": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "TaxRateRef": { - "properties": { - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "PercentBased": { - "type": ["null", "boolean"] - } - }, - "type": ["null", "object"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - }, - "TxnTaxCodeRef": { - "properties": { - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - } - }, - "type": ["null", "object"] - }, - "EmailStatus": { - "type": ["null", "string"] - }, - "LinkedTxn": { - "items": { - "properties": { - "TxnType": { - "type": ["null", "string"] - }, - "TxnId": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - }, - "PrintStatus": { - "type": ["null", "string"] - }, - "ApplyTaxAfterDiscount": { - "type": ["null", "boolean"] - }, - "BillEmail": { - "properties": { - "Address": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "ShipAddr": { - "properties": { - "City": { - "type": ["null", "string"] - }, - "PostalCode": { - "type": ["null", "string"] - }, - "Id": { - "type": ["null", "string"] - }, - "Long": { - "type": ["null", "string"] - }, - "Lat": { - "type": ["null", "string"] - }, - "CountrySubDivisionCode": { - "type": ["null", "string"] - }, - "Line1": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "PrivateNote": { - "type": ["null", "string"] - }, - "TotalAmt": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "patternProperties": {} - }, - "type": ["null", "object"] - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["MetaData"] - }, - "sync_mode": "incremental", - "cursor_field": ["MetaData"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "items", - "json_schema": { - "properties": { - "IncomeAccountRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "PurchaseDesc": { - "type": ["null", "string"] - }, - "ExpenseAccountRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "InvStartDate": { - "format": "date-time", - "type": ["null", "string"] - }, - "Name": { - "type": ["null", "string"] - }, - "Active": { - "type": ["null", "boolean"] - }, - "FullyQualifiedName": { - "type": ["null", "string"] - }, - "Description": { - "type": ["null", "string"] - }, - "Id": { - "type": ["null", "string"] - }, - "Taxable": { - "type": ["null", "boolean"] - }, - "Type": { - "type": ["null", "string"] - }, - "TrackQtyOnHand": { - "type": ["null", "boolean"] - }, - "AssetAccountRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "domain": { - "type": ["null", "string"] - }, - "QtyOnHand": { - "type": ["null", "integer"] - }, - "UnitPrice": { - "type": ["null", "integer"] - }, - "SyncToken": { - "type": ["null", "string"] - }, - "PurchaseCost": { - "format": "singer.decimal", - "type": ["null", "integer", "string"] - }, - "MetaData": { - "properties": { - "CreateTime": { - "format": "date-time", - "type": ["null", "string"] - }, - "LastUpdatedTime": { - "format": "date-time", - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "patternProperties": {} - }, - "type": ["null", "object"] - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["MetaData"] - }, - "sync_mode": "incremental", - "cursor_field": ["MetaData"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "journal_entries", - "json_schema": { - "properties": { - "TaxRateRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "DocNumber": { - "type": ["null", "string"] - }, - "CurrencyRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Id": { - "type": ["null", "string"] - }, - "domain": { - "type": ["null", "string"] - }, - "SyncToken": { - "type": ["null", "string"] - }, - "Line": { - "items": { - "properties": { - "Id": { - "type": ["null", "string"] - }, - "Amount": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "JournalEntryLineDetail": { - "properties": { - "AccountRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "PostingType": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "DetailType": { - "type": ["null", "string"] - }, - "Description": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - }, - "TxnDate": { - "format": "date-time", - "type": ["null", "string"] - }, - "PrivateNote": { - "type": ["null", "string"] - }, - "ExchangeRate": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "MetaData": { - "properties": { - "CreateTime": { - "format": "date-time", - "type": ["null", "string"] - }, - "LastUpdatedTime": { - "format": "date-time", - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Adjustment": { - "type": ["null", "boolean"] - } - }, - "type": ["null", "object"] - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["MetaData"] - }, - "sync_mode": "incremental", - "cursor_field": ["MetaData"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "payment_methods", - "json_schema": { - "properties": { - "Name": { - "type": ["null", "string"] - }, - "domain": { - "type": ["null", "string"] - }, - "MetaData": { - "properties": { - "LastUpdatedTime": { - "format": "date-time", - "type": ["null", "string"] - }, - "CreateTime": { - "format": "date-time", - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Id": { - "type": ["null", "string"] - }, - "SyncToken": { - "type": ["null", "string"] - }, - "Type": { - "type": ["null", "string"] - }, - "Active": { - "type": ["null", "boolean"] - } - }, - "type": ["null", "object"] - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["MetaData"] - }, - "sync_mode": "incremental", - "cursor_field": ["MetaData"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "payments", - "json_schema": { - "properties": { - "DepositToAccountRef": { - "properties": { - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "CurrencyRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "ARAccountRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Line": { - "items": { - "properties": { - "LineEx": { - "properties": { - "any": { - "items": { - "properties": { - "typeSubstituted": { - "type": ["null", "boolean"] - }, - "scope": { - "type": ["null", "string"] - }, - "nil": { - "type": ["null", "boolean"] - }, - "value": { - "properties": { - "Name": { - "type": ["null", "string"] - }, - "Value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "declaredType": { - "type": ["null", "string"] - }, - "name": { - "type": ["null", "string"] - }, - "globalScope": { - "type": ["null", "boolean"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - } - }, - "type": ["null", "object"] - }, - "LinkedTxn": { - "items": { - "properties": { - "TxnType": { - "type": ["null", "string"] - }, - "TxnId": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - }, - "Amount": { - "format": "singer.decimal", - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - }, - "ProcessPayment": { - "type": ["null", "boolean"] - }, - "SyncToken": { - "type": ["null", "string"] - }, - "PrivateNote": { - "type": ["null", "string"] - }, - "ExchangeRate": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "TotalAmt": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "LinkedTxn": { - "items": { - "properties": { - "TxnType": { - "type": ["null", "string"] - }, - "TxnId": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - }, - "UnappliedAmt": { - "type": ["null", "integer"] - }, - "domain": { - "type": ["null", "string"] - }, - "MetaData": { - "properties": { - "LastUpdatedTime": { - "format": "date-time", - "type": ["null", "string"] - }, - "CreateTime": { - "format": "date-time", - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "TxnDate": { - "format": "date-time", - "type": ["null", "string"] - }, - "Id": { - "type": ["null", "string"] - }, - "PaymentMethodRef": { - "properties": { - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "CustomerRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "PaymentRefNum": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["MetaData"] - }, - "sync_mode": "incremental", - "cursor_field": ["MetaData"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "purchase_orders", - "json_schema": { - "properties": { - "Memo": { - "type": ["null", "string"] - }, - "DueDate": { - "format": "date-time", - "type": ["null", "string"] - }, - "PrivateNote": { - "type": ["null", "string"] - }, - "TxnTaxDetail": { - "properties": {}, - "type": ["null", "object"] - }, - "EmailStatus": { - "type": ["null", "string"] - }, - "ShipTo": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "ClassRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "SalesTermRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "CurrencyRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "APAccountRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Id": { - "type": ["null", "string"] - }, - "SyncToken": { - "type": ["null", "string"] - }, - "ShipAddr": { - "properties": { - "Long": { - "type": ["null", "string"] - }, - "Id": { - "type": ["null", "string"] - }, - "Line3": { - "type": ["null", "string"] - }, - "Line2": { - "type": ["null", "string"] - }, - "Lat": { - "type": ["null", "string"] - }, - "Line1": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "LinkedTxn": { - "items": { - "properties": { - "TxnType": { - "type": ["null", "string"] - }, - "TxnId": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - }, - "VendorAddr": { - "properties": { - "Long": { - "type": ["null", "string"] - }, - "Line4": { - "type": ["null", "string"] - }, - "Id": { - "type": ["null", "string"] - }, - "Line3": { - "type": ["null", "string"] - }, - "Line2": { - "type": ["null", "string"] - }, - "Lat": { - "type": ["null", "string"] - }, - "City": { - "type": ["null", "string"] - }, - "Country": { - "type": ["null", "string"] - }, - "Line1": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "domain": { - "type": ["null", "string"] - }, - "CustomField": { - "items": { - "properties": { - "Name": { - "type": ["null", "string"] - }, - "DefinitionId": { - "type": ["null", "string"] - }, - "Type": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - }, - "MetaData": { - "properties": { - "LastUpdatedTime": { - "format": "date-time", - "type": ["null", "string"] - }, - "CreateTime": { - "format": "date-time", - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "ExchangeRate": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "TotalAmt": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "POStatus": { - "type": ["null", "string"] - }, - "VendorRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "TxnDate": { - "format": "date-time", - "type": ["null", "string"] - }, - "DocNumber": { - "type": ["null", "string"] - }, - "DepartmentRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Line": { - "items": { - "properties": { - "Amount": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "LineNum": { - "type": ["null", "integer"] - }, - "Id": { - "type": ["null", "string"] - }, - "DetailType": { - "type": ["null", "string"] - }, - "ItemBasedExpenseLineDetail": { - "properties": { - "BillableStatus": { - "type": ["null", "string"] - }, - "ClassRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "ItemRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "UnitPrice": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "TaxCodeRef": { - "properties": { - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Qty": { - "type": ["null", "integer"] - }, - "CustomerRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - } - }, - "type": ["null", "object"] - }, - "Description": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - } - }, - "type": ["null", "object"] - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["MetaData"] - }, - "sync_mode": "incremental", - "cursor_field": ["MetaData"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "purchases", - "json_schema": { - "properties": { - "PrivateNote": { - "type": ["null", "string"] - }, - "PaymentType": { - "type": ["null", "string"] - }, - "MetaData": { - "properties": { - "LastUpdatedTime": { - "format": "date-time", - "type": ["null", "string"] - }, - "CreateTime": { - "format": "date-time", - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "RemitToAddr": { - "properties": { - "PostalCode": { - "type": ["null", "string"] - }, - "Lat": { - "type": ["null", "string"] - }, - "CountrySubDivisionCode": { - "type": ["null", "string"] - }, - "Line1": { - "type": ["null", "string"] - }, - "Long": { - "type": ["null", "string"] - }, - "Id": { - "type": ["null", "string"] - }, - "City": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "CurrencyRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "ExchangeRate": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "TotalAmt": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "PrintStatus": { - "type": ["null", "string"] - }, - "AccountRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Id": { - "type": ["null", "string"] - }, - "EntityRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "type": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "TxnDate": { - "format": "date-time", - "type": ["null", "string"] - }, - "domain": { - "type": ["null", "string"] - }, - "Credit": { - "type": ["null", "boolean"] - }, - "SyncToken": { - "type": ["null", "string"] - }, - "Line": { - "items": { - "properties": { - "ItemBasedExpenseLineDetail": { - "properties": { - "ItemRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Qty": { - "type": ["null", "integer"] - }, - "BillableStatus": { - "type": ["null", "string"] - }, - "UnitPrice": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "TaxCodeRef": { - "properties": { - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - } - }, - "type": ["null", "object"] - }, - "AccountBasedExpenseLineDetail": { - "properties": { - "AccountRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "CustomerRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "BillableStatus": { - "type": ["null", "string"] - }, - "TaxCodeRef": { - "properties": { - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - } - }, - "type": ["null", "object"] - }, - "Amount": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "DetailType": { - "type": ["null", "string"] - }, - "Description": { - "type": ["null", "string"] - }, - "Id": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - }, - "PurchaseEx": { - "properties": { - "any": { - "items": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "scope": { - "type": ["null", "string"] - }, - "nil": { - "type": ["null", "boolean"] - }, - "globalScope": { - "type": ["null", "boolean"] - }, - "value": { - "properties": { - "Name": { - "type": ["null", "string"] - }, - "Value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "declaredType": { - "type": ["null", "string"] - }, - "typeSubstituted": { - "type": ["null", "boolean"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - } - }, - "type": ["null", "object"] - }, - "DocNumber": { - "type": ["null", "string"] - }, - "patternProperties": {} - }, - "type": ["null", "object"] - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["MetaData"] - }, - "sync_mode": "incremental", - "cursor_field": ["MetaData"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "refund_receipts", - "json_schema": { - "properties": { - "BillEmail": { - "properties": { - "Address": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "PaymentMethodRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "CustomerRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "SyncToken": { - "type": ["null", "string"] - }, - "Line": { - "items": { - "properties": { - "Id": { - "type": ["null", "string"] - }, - "LineNum": { - "type": ["null", "integer"] - }, - "DetailType": { - "type": ["null", "string"] - }, - "Description": { - "type": ["null", "string"] - }, - "Amount": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "SalesItemLineDetail": { - "properties": { - "ItemRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Qty": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "TaxCodeRef": { - "properties": { - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "UnitPrice": { - "type": ["null", "integer"] - } - }, - "type": ["null", "object"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - }, - "CurrencyRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Balance": { - "type": ["null", "integer"] - }, - "TxnTaxDetail": { - "properties": { - "TotalTax": { - "type": ["null", "integer"] - } - }, - "type": ["null", "object"] - }, - "DepositToAccountRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "MetaData": { - "properties": { - "CreateTime": { - "format": "date-time", - "type": ["null", "string"] - }, - "LastUpdatedTime": { - "format": "date-time", - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "CustomerMemo": { - "properties": { - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Id": { - "type": ["null", "string"] - }, - "domain": { - "type": ["null", "string"] - }, - "TxnDate": { - "format": "date-time", - "type": ["null", "string"] - }, - "PrintStatus": { - "type": ["null", "string"] - }, - "CustomField": { - "items": { - "properties": { - "DefinitionId": { - "type": ["null", "string"] - }, - "Name": { - "type": ["null", "string"] - }, - "Type": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - }, - "BillAddr": { - "properties": { - "Lat": { - "type": ["null", "string"] - }, - "Id": { - "type": ["null", "string"] - }, - "Line2": { - "type": ["null", "string"] - }, - "Line4": { - "type": ["null", "string"] - }, - "Line3": { - "type": ["null", "string"] - }, - "Line1": { - "type": ["null", "string"] - }, - "Long": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "DocNumber": { - "type": ["null", "string"] - }, - "ApplyTaxAfterDiscount": { - "type": ["null", "boolean"] - }, - "ExchangeRate": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "HomeTotalAmt": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "TotalAmt": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "patternProperties": {} - }, - "type": ["null", "object"] - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["MetaData"] - }, - "sync_mode": "incremental", - "cursor_field": ["MetaData"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "sales_receipts", - "json_schema": { - "properties": { - "Balance": { - "type": ["null", "integer"] - }, - "CustomerRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "LinkedTxn": { - "items": { - "properties": { - "TxnType": { - "type": ["null", "string"] - }, - "TxnId": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - }, - "ApplyTaxAfterDiscount": { - "type": ["null", "boolean"] - }, - "PaymentRefNum": { - "type": ["null", "string"] - }, - "TxnTaxDetail": { - "properties": { - "TotalTax": { - "type": ["null", "integer"] - } - }, - "type": ["null", "object"] - }, - "PrintStatus": { - "type": ["null", "string"] - }, - "MetaData": { - "properties": { - "LastUpdatedTime": { - "format": "date-time", - "type": ["null", "string"] - }, - "CreateTime": { - "format": "date-time", - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "CustomField": { - "items": { - "properties": { - "Name": { - "type": ["null", "string"] - }, - "DefinitionId": { - "type": ["null", "string"] - }, - "Type": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - }, - "BillAddr": { - "properties": { - "Long": { - "type": ["null", "string"] - }, - "Line2": { - "type": ["null", "string"] - }, - "Lat": { - "type": ["null", "string"] - }, - "Line1": { - "type": ["null", "string"] - }, - "Line3": { - "type": ["null", "string"] - }, - "Line4": { - "type": ["null", "string"] - }, - "Id": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "domain": { - "type": ["null", "string"] - }, - "SyncToken": { - "type": ["null", "string"] - }, - "EmailStatus": { - "type": ["null", "string"] - }, - "Line": { - "items": { - "properties": { - "DiscountLineDetail": { - "properties": { - "PercentBased": { - "type": ["null", "boolean"] - }, - "DiscountPercent": { - "type": ["null", "integer"] - }, - "DiscountAccountRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - } - }, - "type": ["null", "object"] - }, - "Amount": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "LineNum": { - "type": ["null", "integer"] - }, - "DetailType": { - "type": ["null", "string"] - }, - "SalesItemLineDetail": { - "properties": { - "ItemRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Qty": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "UnitPrice": { - "type": ["null", "integer"] - }, - "TaxCodeRef": { - "properties": { - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - } - }, - "type": ["null", "object"] - }, - "Id": { - "type": ["null", "string"] - }, - "Description": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - }, - "CurrencyRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "PaymentMethodRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "TxnDate": { - "format": "date-time", - "type": ["null", "string"] - }, - "Id": { - "type": ["null", "string"] - }, - "DocNumber": { - "type": ["null", "string"] - }, - "BillEmail": { - "properties": { - "Address": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "CustomerMemo": { - "properties": { - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "ShipAddr": { - "properties": { - "PostalCode": { - "type": ["null", "string"] - }, - "Lat": { - "type": ["null", "string"] - }, - "CountrySubDivisionCode": { - "type": ["null", "string"] - }, - "Line1": { - "type": ["null", "string"] - }, - "Country": { - "type": ["null", "string"] - }, - "Long": { - "type": ["null", "string"] - }, - "Id": { - "type": ["null", "string"] - }, - "City": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "ExchangeRate": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "HomeTotalAmt": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "TotalAmt": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "DepositToAccountRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "patternProperties": {} - }, - "type": ["null", "object"] - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["MetaData"] - }, - "sync_mode": "incremental", - "cursor_field": ["MetaData"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "tax_agencies", - "json_schema": { - "properties": { - "Id": { - "type": ["null", "string"] - }, - "TaxRegistrationNumber": { - "type": ["null", "string"] - }, - "domain": { - "type": ["null", "string"] - }, - "SyncToken": { - "type": ["null", "string"] - }, - "TaxTrackedOnPurchases": { - "type": ["null", "boolean"] - }, - "DisplayName": { - "type": ["null", "string"] - }, - "MetaData": { - "properties": { - "CreateTime": { - "format": "date-time", - "type": ["null", "string"] - }, - "LastUpdatedTime": { - "format": "date-time", - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "TaxTrackedOnSales": { - "type": ["null", "boolean"] - } - }, - "type": ["null", "object"] - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["MetaData"] - }, - "sync_mode": "incremental", - "cursor_field": ["MetaData"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "tax_codes", - "json_schema": { - "properties": { - "TaxGroup": { - "type": ["null", "boolean"] - }, - "PurchaseTaxRateList": { - "properties": {}, - "type": ["null", "object"] - }, - "Hidden": { - "type": ["null", "boolean"] - }, - "domain": { - "type": ["null", "string"] - }, - "SyncToken": { - "type": ["null", "string"] - }, - "Active": { - "type": ["null", "boolean"] - }, - "Taxable": { - "type": ["null", "boolean"] - }, - "Description": { - "type": ["null", "string"] - }, - "Name": { - "type": ["null", "string"] - }, - "Id": { - "type": ["null", "string"] - }, - "SalesTaxRateList": { - "properties": { - "TaxRateDetail": { - "items": { - "properties": { - "TaxOrder": { - "type": ["null", "integer"] - }, - "TaxTypeApplicable": { - "type": ["null", "string"] - }, - "TaxRateRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - } - }, - "type": ["null", "object"] - }, - "MetaData": { - "properties": { - "CreateTime": { - "format": "date-time", - "type": ["null", "string"] - }, - "LastUpdatedTime": { - "format": "date-time", - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - } - }, - "type": ["null", "object"] - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["MetaData"] - }, - "sync_mode": "incremental", - "cursor_field": ["MetaData"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "tax_rates", - "json_schema": { - "properties": { - "SpecialTaxType": { - "type": ["null", "string"] - }, - "SyncToken": { - "type": ["null", "string"] - }, - "AgencyRef": { - "properties": { - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Description": { - "type": ["null", "string"] - }, - "MetaData": { - "properties": { - "CreateTime": { - "format": "date-time", - "type": ["null", "string"] - }, - "LastUpdatedTime": { - "format": "date-time", - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Id": { - "type": ["null", "string"] - }, - "domain": { - "type": ["null", "string"] - }, - "Active": { - "type": ["null", "boolean"] - }, - "RateValue": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "Name": { - "type": ["null", "string"] - }, - "DisplayType": { - "type": ["null", "string"] - }, - "EffectiveTaxRate": { - "anyOf": [ - { - "properties": { - "RateValue": { - "type": ["null", "string"], - "format": "singer.decimal" - }, - "EndDate": { - "type": ["null", "string"], - "format": "date-time" - }, - "EffectiveDate ": { - "type": ["null", "string"], - "format": "date-time" - } - }, - "type": ["null", "object"] - }, - { - "type": ["null", "array"], - "items": { - "properties": { - "RateValue": { - "type": ["null", "string"], - "format": "singer.decimal" - }, - "EndDate": { - "type": ["null", "string"], - "format": "date-time" - }, - "EffectiveDate ": { - "type": ["null", "string"], - "format": "date-time" - } - }, - "type": ["null", "object"] - } - } - ] - } - }, - "type": ["null", "object"] - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["MetaData"] - }, - "sync_mode": "incremental", - "cursor_field": ["MetaData"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "terms", - "json_schema": { - "properties": { - "Id": { - "type": ["null", "string"] - }, - "DiscountPercent": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "DayOfMonthDue": { - "type": ["null", "integer"] - }, - "DiscountDayOfMonth": { - "type": ["null", "integer"] - }, - "DueNextMonthDays": { - "type": ["null", "integer"] - }, - "domain": { - "type": ["null", "string"] - }, - "Type": { - "type": ["null", "string"] - }, - "Active": { - "type": ["null", "boolean"] - }, - "DueDays": { - "type": ["null", "integer"] - }, - "SyncToken": { - "type": ["null", "string"] - }, - "Name": { - "type": ["null", "string"] - }, - "DiscountDays": { - "type": ["null", "integer"] - }, - "MetaData": { - "properties": { - "CreateTime": { - "format": "date-time", - "type": ["null", "string"] - }, - "LastUpdatedTime": { - "format": "date-time", - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - } - }, - "type": ["null", "object"] - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["MetaData"] - }, - "sync_mode": "incremental", - "cursor_field": ["MetaData"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "time_activities", - "json_schema": { - "properties": { - "HourlyRate": { - "type": ["null", "integer"] - }, - "CustomerRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Taxable": { - "type": ["null", "boolean"] - }, - "Description": { - "type": ["null", "string"] - }, - "Minutes": { - "type": ["null", "integer"] - }, - "MetaData": { - "properties": { - "CreateTime": { - "format": "date-time", - "type": ["null", "string"] - }, - "LastUpdatedTime": { - "format": "date-time", - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "ItemRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Id": { - "type": ["null", "string"] - }, - "domain": { - "type": ["null", "string"] - }, - "TxnDate": { - "format": "date-time", - "type": ["null", "string"] - }, - "SyncToken": { - "type": ["null", "string"] - }, - "EmployeeRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "BillableStatus": { - "type": ["null", "string"] - }, - "NameOf": { - "type": ["null", "string"] - }, - "Hours": { - "type": ["null", "integer"] - }, - "patternProperties": {} - }, - "type": ["null", "object"] - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["MetaData"] - }, - "sync_mode": "incremental", - "cursor_field": ["MetaData"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "transfers", - "json_schema": { - "properties": { - "PrivateNote": { - "type": ["null", "string"] - }, - "MetaData": { - "properties": { - "LastUpdatedTime": { - "format": "date-time", - "type": ["null", "string"] - }, - "CreateTime": { - "format": "date-time", - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "TxnDate": { - "format": "date-time", - "type": ["null", "string"] - }, - "Id": { - "type": ["null", "string"] - }, - "domain": { - "type": ["null", "string"] - }, - "ExchangeRate": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "Amount": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "SyncToken": { - "type": ["null", "string"] - }, - "ToAccountRef": { - "properties": { - "value": { - "type": ["null", "string"] - }, - "name": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "CurrencyRef": { - "properties": { - "value": { - "type": ["null", "string"] - }, - "name": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "FromAccountRef": { - "properties": { - "value": { - "type": ["null", "string"] - }, - "name": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - } - }, - "type": ["null", "object"] - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["MetaData"] - }, - "sync_mode": "incremental", - "cursor_field": ["MetaData"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "vendor_credits", - "json_schema": { - "properties": { - "MetaData": { - "properties": { - "LastUpdatedTime": { - "format": "date-time", - "type": ["null", "string"] - }, - "CreateTime": { - "format": "date-time", - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "ExchangeRate": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "TotalAmt": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "SyncToken": { - "type": ["null", "string"] - }, - "domain": { - "type": ["null", "string"] - }, - "VendorRef": { - "properties": { - "value": { - "type": ["null", "string"] - }, - "name": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "DepartmentRef": { - "properties": { - "value": { - "type": ["null", "string"] - }, - "name": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "APAccountRef": { - "properties": { - "value": { - "type": ["null", "string"] - }, - "name": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "TxnDate": { - "format": "date-time", - "type": ["null", "string"] - }, - "Id": { - "type": ["null", "string"] - }, - "Line": { - "items": { - "properties": { - "LineNum": { - "type": ["null", "integer"] - }, - "AccountBasedExpenseLineDetail": { - "properties": { - "CustomerRef": { - "properties": { - "value": { - "type": ["null", "string"] - }, - "name": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "ClassRef": { - "properties": { - "value": { - "type": ["null", "string"] - }, - "name": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "AccountRef": { - "properties": { - "value": { - "type": ["null", "string"] - }, - "name": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "BillableStatus": { - "type": ["null", "string"] - }, - "TaxCodeRef": { - "properties": { - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - } - }, - "type": ["null", "object"] - }, - "Id": { - "type": ["null", "string"] - }, - "Amount": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "DetailType": { - "type": ["null", "string"] - }, - "Description": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] - }, - "CurrencyRef": { - "properties": { - "value": { - "type": ["null", "string"] - }, - "name": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "DocNumber": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["MetaData"] - }, - "sync_mode": "incremental", - "cursor_field": ["MetaData"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "vendors", - "json_schema": { - "properties": { - "GivenName": { - "type": ["null", "string"] - }, - "PrimaryPhone": { - "properties": { - "FreeFormNumber": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "AcctNum": { - "type": ["null", "string"] - }, - "MiddleName": { - "type": ["null", "string"] - }, - "BillAddr": { - "properties": { - "Lat": { - "type": ["null", "string"] - }, - "Id": { - "type": ["null", "string"] - }, - "CountrySubDivisionCode": { - "type": ["null", "string"] - }, - "Country": { - "type": ["null", "string"] - }, - "City": { - "type": ["null", "string"] - }, - "Long": { - "type": ["null", "string"] - }, - "PostalCode": { - "type": ["null", "string"] - }, - "Line1": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "PrimaryEmailAddr": { - "properties": { - "Address": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Balance": { - "format": "singer.decimal", - "type": ["null", "string"] - }, - "TaxIdentifier": { - "type": ["null", "string"] - }, - "CompanyName": { - "type": ["null", "string"] - }, - "FamilyName": { - "type": ["null", "string"] - }, - "PrintOnCheckName": { - "type": ["null", "string"] - }, - "WebAddr": { - "properties": { - "URI": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Mobile": { - "properties": { - "FreeFormNumber": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "CurrencyRef": { - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Vendor1099": { - "type": ["null", "boolean"] - }, - "SyncToken": { - "type": ["null", "string"] - }, - "DisplayName": { - "type": ["null", "string"] - }, - "TermRef": { - "properties": { - "value": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "MetaData": { - "properties": { - "CreateTime": { - "format": "date-time", - "type": ["null", "string"] - }, - "LastUpdatedTime": { - "format": "date-time", - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Fax": { - "properties": { - "FreeFormNumber": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "Suffix": { - "type": ["null", "string"] - }, - "Id": { - "type": ["null", "string"] - }, - "domain": { - "type": ["null", "string"] - }, - "Active": { - "type": ["null", "boolean"] - }, - "Title": { - "type": ["null", "string"] - }, - "patternProperties": {} - }, - "type": ["null", "object"] - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["MetaData"] - }, - "sync_mode": "incremental", - "cursor_field": ["MetaData"], - "destination_sync_mode": "append" - } - ] -} diff --git a/airbyte-integrations/connectors/source-quickbooks-singer/setup.py b/airbyte-integrations/connectors/source-quickbooks-singer/setup.py index c9a21e25c51d2..0d2b0f4b8dab8 100644 --- a/airbyte-integrations/connectors/source-quickbooks-singer/setup.py +++ b/airbyte-integrations/connectors/source-quickbooks-singer/setup.py @@ -25,12 +25,25 @@ from setuptools import find_packages, setup +MAIN_REQUIREMENTS = [ + "tap-quickbooks @ https://github.com/airbytehq//tap-quickbooks/tarball/v1.0.5-airbyte", + "airbyte-cdk", +] + +TEST_REQUIREMENTS = [ + "pytest~=6.1", + "source-acceptance-test", +] + setup( name="source_quickbooks_singer", description="Source implementation for Quickbooks, built on the Singer tap implementation.", author="Airbyte", author_email="contact@airbyte.io", packages=find_packages(), - install_requires=["tap-quickbooks==1.0.4", "airbyte-protocol", "base-singer", "base-python", "pytest==6.1.2"], + install_requires=MAIN_REQUIREMENTS, package_data={"": ["*.json"]}, + extras_require={ + "tests": TEST_REQUIREMENTS, + }, ) diff --git a/airbyte-integrations/connectors/source-quickbooks-singer/source_quickbooks_singer/source.py b/airbyte-integrations/connectors/source-quickbooks-singer/source_quickbooks_singer/source.py index c4cc29c8d62f3..c1539710f1188 100644 --- a/airbyte-integrations/connectors/source-quickbooks-singer/source_quickbooks_singer/source.py +++ b/airbyte-integrations/connectors/source-quickbooks-singer/source_quickbooks_singer/source.py @@ -25,29 +25,21 @@ import json -from base_python import AirbyteLogger -from base_singer import BaseSingerSource +from airbyte_cdk.logger import AirbyteLogger +from airbyte_cdk.models import AirbyteConnectionStatus, Status +from airbyte_cdk.sources.singer import SingerSource from requests_oauthlib import OAuth2Session -from tap_quickbooks.client import ( - PROD_ENDPOINT_BASE, - SANDBOX_ENDPOINT_BASE, - TOKEN_REFRESH_URL, - Quickbooks4XXException, - Quickbooks5XXException, - QuickbooksAuthenticationError, -) +from tap_quickbooks.client import PROD_ENDPOINT_BASE, SANDBOX_ENDPOINT_BASE, TOKEN_REFRESH_URL -class SourceQuickbooksSinger(BaseSingerSource): - tap_cmd = "tap-quickbooks" - tap_name = "Quickbooks API" - api_error = Exception +class SourceQuickbooksSinger(SingerSource): + TAP_CMD = "tap-quickbooks" def _write_config(self, token): logger = AirbyteLogger() logger.info("Credentials Refreshed") - def try_connect(self, logger: AirbyteLogger, config: json): + def check_config(self, logger: AirbyteLogger, config_path: str, config: json) -> AirbyteConnectionStatus: token = {"refresh_token": config["refresh_token"], "token_type": "Bearer", "access_token": "wrong", "expires_in": "-30"} extra = {"client_id": config["client_id"], "client_secret": config["client_secret"]} @@ -72,11 +64,17 @@ def try_connect(self, logger: AirbyteLogger, config: json): else: full_url = PROD_ENDPOINT_BASE + endpoint - response = session.request("GET", full_url, headers=headers, params=params) + try: + session.request("GET", full_url, headers=headers, params=params) + return AirbyteConnectionStatus(status=Status.SUCCEEDED) + except Exception as e: + return AirbyteConnectionStatus(status=Status.FAILED, message=f"An exception occurred: {str(e)}") - if response.status_code >= 500: - raise Quickbooks5XXException(response.text) - elif response.status_code in (401, 403): - raise QuickbooksAuthenticationError(response.text) - elif response.status_code >= 400: - raise Quickbooks4XXException(response.text) + def discover_cmd(self, logger: AirbyteLogger, config_path: str) -> str: + return f"{self.TAP_CMD} --config {config_path} --discover" + + def read_cmd(self, logger: AirbyteLogger, config_path: str, catalog_path: str, state_path: str = None) -> str: + config_option = f"--config {config_path}" + properties_option = f"--catalog {catalog_path}" + state_option = f"--state {state_path}" if state_path else "" + return f"{self.TAP_CMD} {config_option} {properties_option} {state_option}" diff --git a/docs/integrations/sources/quickbooks.md b/docs/integrations/sources/quickbooks.md index c1f4ac9b38a8e..a69312711f0d5 100644 --- a/docs/integrations/sources/quickbooks.md +++ b/docs/integrations/sources/quickbooks.md @@ -78,4 +78,5 @@ The easiest way to get these credentials is by using Quickbook's [OAuth 2.0 play | Version | Date | Pull Request | Subject | | :------ | :-------- | :----- | :------ | +| `0.1.3` | 2021-08-10 | [4986](https://github.com/airbytehq/airbyte/pull/4986) | Using number data type for decimal fields instead string | | `0.1.2` | 2021-07-06 | [4539](https://github.com/airbytehq/airbyte/pull/4539) | Add `AIRBYTE_ENTRYPOINT` for Kubernetes support |