From 002b755f4a7d99ead91752db7f074e1e823759ac Mon Sep 17 00:00:00 2001 From: btkcodedev Date: Tue, 11 Jun 2024 22:37:04 +0530 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8Source=20Chargify:=20Make=20Connector?= =?UTF-8?q?=20Compatible=20with=20Builder=20(#38814)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../connectors/source-chargify/.dockerignore | 6 - .../connectors/source-chargify/README.md | 32 +- .../connectors/source-chargify/__init__.py | 2 +- .../integration_tests/__init__.py | 2 +- .../integration_tests/acceptance.py | 2 +- .../connectors/source-chargify/metadata.yaml | 2 +- .../connectors/source-chargify/poetry.lock | 90 +- .../connectors/source-chargify/pyproject.toml | 15 +- .../source-chargify/requirements.txt | 1 - .../source_chargify/__init__.py | 2 +- .../source_chargify/manifest.yaml | 1692 +++++++++++++++-- .../source-chargify/source_chargify/run.py | 5 +- .../source_chargify/schemas/coupons.json | 49 - .../source_chargify/schemas/customers.json | 91 - .../source_chargify/schemas/invoices.json | 90 - .../schemas/subscriptions.json | 576 ------ .../source_chargify/schemas/transactions.json | 34 - .../source-chargify/source_chargify/source.py | 2 +- docs/integrations/sources/chargify.md | 1 + 19 files changed, 1661 insertions(+), 1033 deletions(-) delete mode 100644 airbyte-integrations/connectors/source-chargify/.dockerignore delete mode 100644 airbyte-integrations/connectors/source-chargify/requirements.txt delete mode 100644 airbyte-integrations/connectors/source-chargify/source_chargify/schemas/coupons.json delete mode 100644 airbyte-integrations/connectors/source-chargify/source_chargify/schemas/customers.json delete mode 100644 airbyte-integrations/connectors/source-chargify/source_chargify/schemas/invoices.json delete mode 100644 airbyte-integrations/connectors/source-chargify/source_chargify/schemas/subscriptions.json delete mode 100644 airbyte-integrations/connectors/source-chargify/source_chargify/schemas/transactions.json diff --git a/airbyte-integrations/connectors/source-chargify/.dockerignore b/airbyte-integrations/connectors/source-chargify/.dockerignore deleted file mode 100644 index 1a69703313fd..000000000000 --- a/airbyte-integrations/connectors/source-chargify/.dockerignore +++ /dev/null @@ -1,6 +0,0 @@ -* -!Dockerfile -!main.py -!source_chargify -!setup.py -!secrets diff --git a/airbyte-integrations/connectors/source-chargify/README.md b/airbyte-integrations/connectors/source-chargify/README.md index 0f3af98989be..966b0bb344c7 100644 --- a/airbyte-integrations/connectors/source-chargify/README.md +++ b/airbyte-integrations/connectors/source-chargify/README.md @@ -7,11 +7,14 @@ For information about how to use this connector within Airbyte, see [the documen ## Local development ### Prerequisites -* Python (~=3.9) -* Poetry (~=1.7) - installation instructions [here](https://python-poetry.org/docs/#installation) + +* Python (`^3.9`) +* Poetry (`^1.7`) - installation instructions [here](https://python-poetry.org/docs/#installation) + ### Installing the connector + From this connector directory, run: ```bash poetry install --with dev @@ -19,13 +22,16 @@ poetry install --with dev ### Create credentials + **If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.com/integrations/sources/chargify) -to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_chargify/spec.yaml` file. +to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `src/source_chargify/spec.yaml` file. Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information. See `sample_files/sample_config.json` for a sample config file. +See `sample_files/sample_config.json` for a sample config file. ### Locally running the connector + ``` poetry run source-chargify spec poetry run source-chargify check --config secrets/config.json @@ -33,13 +39,16 @@ poetry run source-chargify discover --config secrets/config.json poetry run source-chargify read --config secrets/config.json --catalog sample_files/configured_catalog.json ``` -### Running unit tests -To run unit tests locally, from the connector directory run: +### Running tests + +To run tests locally, from the connector directory run: + ``` -poetry run pytest unit_tests +poetry run pytest tests ``` ### Building the docker image + 1. Install [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md) 2. Run the following command to build the docker image: ```bash @@ -47,9 +56,11 @@ airbyte-ci connectors --name=source-chargify build ``` An image will be available on your host with the tag `airbyte/source-chargify:dev`. +An image will be available on your host with the tag `airbyte/source-chargify:dev`. ### Running as a docker container + Then run any of the connector commands as follows: ``` docker run --rm airbyte/source-chargify:dev spec @@ -59,16 +70,19 @@ docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integrat ``` ### Running our CI test suite + You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md): ```bash airbyte-ci connectors --name=source-chargify test ``` ### Customizing acceptance Tests + Customize `acceptance-test-config.yml` file to configure acceptance tests. See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) for more information. If your connector requires to create or destroy resources for use during acceptance tests create fixtures for it and place them inside integration_tests/acceptance.py. ### Dependency Management + All of your dependencies should be managed via Poetry. To add a new dependency, run: ```bash @@ -78,14 +92,20 @@ poetry add Please commit the changes to `pyproject.toml` and `poetry.lock` files. ## Publishing a new version of the connector + You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what? 1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-chargify test` +2. Bump the connector version (please follow [semantic versioning for connectors](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#semantic-versioning-for-connectors)): + - bump the `dockerImageTag` value in in `metadata.yaml` + - bump the `version` value in `pyproject.toml` 2. Bump the connector version (please follow [semantic versioning for connectors](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#semantic-versioning-for-connectors)): - bump the `dockerImageTag` value in in `metadata.yaml` - bump the `version` value in `pyproject.toml` 3. Make sure the `metadata.yaml` content is up to date. 4. Make sure the connector documentation and its changelog is up to date (`docs/integrations/sources/chargify.md`). +4. Make sure the connector documentation and its changelog is up to date (`docs/integrations/sources/chargify.md`). 5. Create a Pull Request: use [our PR naming conventions](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#pull-request-title-convention). 6. Pat yourself on the back for being an awesome contributor. 7. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master. +8. Once your PR is merged, the new version of the connector will be automatically published to Docker Hub and our connector registry. 8. Once your PR is merged, the new version of the connector will be automatically published to Docker Hub and our connector registry. \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-chargify/__init__.py b/airbyte-integrations/connectors/source-chargify/__init__.py index c941b3045795..66f6de8cb2bb 100644 --- a/airbyte-integrations/connectors/source-chargify/__init__.py +++ b/airbyte-integrations/connectors/source-chargify/__init__.py @@ -1,3 +1,3 @@ # -# Copyright (c) 2023 Airbyte, Inc., all rights reserved. +# Copyright (c) 2024 Airbyte, Inc., all rights reserved. # diff --git a/airbyte-integrations/connectors/source-chargify/integration_tests/__init__.py b/airbyte-integrations/connectors/source-chargify/integration_tests/__init__.py index c941b3045795..66f6de8cb2bb 100644 --- a/airbyte-integrations/connectors/source-chargify/integration_tests/__init__.py +++ b/airbyte-integrations/connectors/source-chargify/integration_tests/__init__.py @@ -1,3 +1,3 @@ # -# Copyright (c) 2023 Airbyte, Inc., all rights reserved. +# Copyright (c) 2024 Airbyte, Inc., all rights reserved. # diff --git a/airbyte-integrations/connectors/source-chargify/integration_tests/acceptance.py b/airbyte-integrations/connectors/source-chargify/integration_tests/acceptance.py index 9e6409236281..aaeb7f6c2529 100644 --- a/airbyte-integrations/connectors/source-chargify/integration_tests/acceptance.py +++ b/airbyte-integrations/connectors/source-chargify/integration_tests/acceptance.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2023 Airbyte, Inc., all rights reserved. +# Copyright (c) 2024 Airbyte, Inc., all rights reserved. # diff --git a/airbyte-integrations/connectors/source-chargify/metadata.yaml b/airbyte-integrations/connectors/source-chargify/metadata.yaml index 2f456a77c18a..5096391c4676 100644 --- a/airbyte-integrations/connectors/source-chargify/metadata.yaml +++ b/airbyte-integrations/connectors/source-chargify/metadata.yaml @@ -14,7 +14,7 @@ data: connectorSubtype: api connectorType: source definitionId: 9b2d3607-7222-4709-9fa2-c2abdebbdd88 - dockerImageTag: 0.4.2 + dockerImageTag: 0.4.3 dockerRepository: airbyte/source-chargify githubIssueLabel: source-chargify icon: chargify.svg diff --git a/airbyte-integrations/connectors/source-chargify/poetry.lock b/airbyte-integrations/connectors/source-chargify/poetry.lock index 7ced215b809a..129e7e2dd864 100644 --- a/airbyte-integrations/connectors/source-chargify/poetry.lock +++ b/airbyte-integrations/connectors/source-chargify/poetry.lock @@ -1,14 +1,14 @@ -# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. [[package]] name = "airbyte-cdk" -version = "1.0.0" +version = "0.90.0" description = "A framework for writing Airbyte Connectors." optional = false python-versions = "<4.0,>=3.9" files = [ - {file = "airbyte_cdk-1.0.0-py3-none-any.whl", hash = "sha256:74cd8d4f9790b9a164731c42236cb015166b5ab2b0754b6a1fd730f223eb4e7f"}, - {file = "airbyte_cdk-1.0.0.tar.gz", hash = "sha256:102b75ce589460be4f75dabd3402ac7aa633c90758558c81d140fd436b76371f"}, + {file = "airbyte_cdk-0.90.0-py3-none-any.whl", hash = "sha256:bd0aa5843cdc4901f2e482f0e86695ca4e6db83b65c5017799255dd20535cf56"}, + {file = "airbyte_cdk-0.90.0.tar.gz", hash = "sha256:25cefc010718bada5cce3f87e7ae93068630732c0d34ce5145f8ddf7457d4d3c"}, ] [package.dependencies] @@ -54,16 +54,6 @@ files = [ [package.dependencies] pydantic = ">=1.9.2,<2.0.0" -[[package]] -name = "atomicwrites" -version = "1.4.1" -description = "Atomic file writes." -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -files = [ - {file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"}, -] - [[package]] name = "attrs" version = "23.2.0" @@ -566,13 +556,13 @@ extended-testing = ["jinja2 (>=3,<4)"] [[package]] name = "langsmith" -version = "0.1.60" +version = "0.1.65" description = "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform." optional = false python-versions = "<4.0,>=3.8.1" files = [ - {file = "langsmith-0.1.60-py3-none-any.whl", hash = "sha256:3c3520ea473de0a984237b3e9d638fdf23ef3acc5aec89a42e693225e72d6120"}, - {file = "langsmith-0.1.60.tar.gz", hash = "sha256:6a145b5454437f9e0f81525f23c4dcdbb8c07b1c91553b8f697456c418d6a599"}, + {file = "langsmith-0.1.65-py3-none-any.whl", hash = "sha256:ab4487029240e69cca30da1065f1e9138e5a7ca2bbe8c697f0bd7d5839f71cf7"}, + {file = "langsmith-0.1.65.tar.gz", hash = "sha256:d3c2eb2391478bd79989f02652cf66e29a7959d677614b6993a47cef43f7f43b"}, ] [package.dependencies] @@ -780,17 +770,6 @@ files = [ dev = ["pre-commit", "tox"] testing = ["pytest", "pytest-benchmark"] -[[package]] -name = "py" -version = "1.11.0" -description = "library with cross-python path, ini-parsing, io, code, log facilities" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -files = [ - {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, - {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, -] - [[package]] name = "pycparser" version = "2.22" @@ -929,27 +908,25 @@ files = [ [[package]] name = "pytest" -version = "6.2.5" +version = "8.2.1" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.6" +python-versions = ">=3.8" files = [ - {file = "pytest-6.2.5-py3-none-any.whl", hash = "sha256:7310f8d27bc79ced999e760ca304d69f6ba6c6649c0b60fb0e04a4a77cacc134"}, - {file = "pytest-6.2.5.tar.gz", hash = "sha256:131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89"}, + {file = "pytest-8.2.1-py3-none-any.whl", hash = "sha256:faccc5d332b8c3719f40283d0d44aa5cf101cec36f88cde9ed8f2bc0538612b1"}, + {file = "pytest-8.2.1.tar.gz", hash = "sha256:5046e5b46d8e4cac199c373041f26be56fdb81eb4e67dc11d4e10811fc3408fd"}, ] [package.dependencies] -atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} -attrs = ">=19.2.0" colorama = {version = "*", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} iniconfig = "*" packaging = "*" -pluggy = ">=0.12,<2.0" -py = ">=1.8.2" -toml = "*" +pluggy = ">=1.5,<2.0" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-mock" @@ -1066,13 +1043,13 @@ files = [ [[package]] name = "requests" -version = "2.32.1" +version = "2.32.3" description = "Python HTTP for Humans." optional = false python-versions = ">=3.8" files = [ - {file = "requests-2.32.1-py3-none-any.whl", hash = "sha256:21ac9465cdf8c1650fe1ecde8a71669a93d4e6f147550483a2967d08396a56a5"}, - {file = "requests-2.32.1.tar.gz", hash = "sha256:eb97e87e64c79e64e5b8ac75cee9dd1f97f49e289b083ee6be96268930725685"}, + {file = "requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"}, + {file = "requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760"}, ] [package.dependencies] @@ -1134,19 +1111,18 @@ fixture = ["fixtures"] [[package]] name = "setuptools" -version = "69.5.1" +version = "70.0.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "setuptools-69.5.1-py3-none-any.whl", hash = "sha256:c636ac361bc47580504644275c9ad802c50415c7522212252c033bd15f301f32"}, - {file = "setuptools-69.5.1.tar.gz", hash = "sha256:6c1fccdac05a97e598fb0ae3bbed5904ccb317337a51139dcd51453611bbb987"}, + {file = "setuptools-70.0.0-py3-none-any.whl", hash = "sha256:54faa7f2e8d2d11bcd2c07bed282eef1046b5c080d1c32add737d7b5817b1ad4"}, + {file = "setuptools-70.0.0.tar.gz", hash = "sha256:f211a66637b8fa059bb28183da127d4e86396c991a942b028c6650d4319c3fd0"}, ] [package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] -testing = ["build[virtualenv]", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "mypy (==1.9)", "packaging (>=23.2)", "pip (>=19.1)", "pytest (>=6,!=8.1.1)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (>=0.2.1)", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] -testing-integration = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "packaging (>=23.2)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] +testing = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "mypy (==1.9)", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.1)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (>=0.2.1)", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] [[package]] name = "six" @@ -1175,25 +1151,25 @@ doc = ["reno", "sphinx"] test = ["pytest", "tornado (>=4.5)", "typeguard"] [[package]] -name = "toml" -version = "0.10.2" -description = "Python Library for Tom's Obvious, Minimal Language" +name = "tomli" +version = "2.0.1" +description = "A lil' TOML parser" optional = false -python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +python-versions = ">=3.7" files = [ - {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, - {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, + {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, + {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, ] [[package]] name = "typing-extensions" -version = "4.11.0" +version = "4.12.0" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" files = [ - {file = "typing_extensions-4.11.0-py3-none-any.whl", hash = "sha256:c1f94d72897edaf4ce775bb7558d5b79d8126906a14ea5ed1635921406c0387a"}, - {file = "typing_extensions-4.11.0.tar.gz", hash = "sha256:83f085bd5ca59c80295fc2a82ab5dac679cbe02b9f33f7d83af68e241bea51b0"}, + {file = "typing_extensions-4.12.0-py3-none-any.whl", hash = "sha256:b349c66bea9016ac22978d800cfff206d5f9816951f12a7d0ec5578b0a819594"}, + {file = "typing_extensions-4.12.0.tar.gz", hash = "sha256:8cbcdc8606ebcb0d95453ad7dc5065e6237b6aa230a31e81d0f440c30fed5fd8"}, ] [[package]] @@ -1323,4 +1299,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.9,<3.12" -content-hash = "656a09cf041cb51ce84e287501b40bd60394c28750360db74d7c8fc4b7f291f7" +content-hash = "acd5908c82765b55ec5859799db1bcbb616d044db689a3ba94346d8b1d2f9b5c" diff --git a/airbyte-integrations/connectors/source-chargify/pyproject.toml b/airbyte-integrations/connectors/source-chargify/pyproject.toml index 988317a57d87..5f0d4af75c6e 100644 --- a/airbyte-integrations/connectors/source-chargify/pyproject.toml +++ b/airbyte-integrations/connectors/source-chargify/pyproject.toml @@ -3,26 +3,25 @@ requires = [ "poetry-core>=1.0.0",] build-backend = "poetry.core.masonry.api" [tool.poetry] -version = "0.4.2" +version = "0.4.3" name = "source-chargify" -description = "Source implementation for Chargify." +description = "Source implementation for chargify." authors = [ "Airbyte ",] license = "MIT" readme = "README.md" documentation = "https://docs.airbyte.com/integrations/sources/chargify" homepage = "https://airbyte.com" repository = "https://github.com/airbytehq/airbyte" -[[tool.poetry.packages]] -include = "source_chargify" +packages = [ { include = "source_chargify" }, {include = "main.py" } ] [tool.poetry.dependencies] python = "^3.9,<3.12" -airbyte-cdk = "1.0.0" +airbyte-cdk = "^0" [tool.poetry.scripts] source-chargify = "source_chargify.run:run" [tool.poetry.group.dev.dependencies] -requests-mock = "^1.9.3" -pytest = "^6.1" -pytest-mock = "^3.6.1" +requests-mock = "*" +pytest-mock = "*" +pytest = "*" diff --git a/airbyte-integrations/connectors/source-chargify/requirements.txt b/airbyte-integrations/connectors/source-chargify/requirements.txt deleted file mode 100644 index d6e1198b1ab1..000000000000 --- a/airbyte-integrations/connectors/source-chargify/requirements.txt +++ /dev/null @@ -1 +0,0 @@ --e . diff --git a/airbyte-integrations/connectors/source-chargify/source_chargify/__init__.py b/airbyte-integrations/connectors/source-chargify/source_chargify/__init__.py index 233a409d39e7..4e46c063d97c 100644 --- a/airbyte-integrations/connectors/source-chargify/source_chargify/__init__.py +++ b/airbyte-integrations/connectors/source-chargify/source_chargify/__init__.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2023 Airbyte, Inc., all rights reserved. +# Copyright (c) 2024 Airbyte, Inc., all rights reserved. # diff --git a/airbyte-integrations/connectors/source-chargify/source_chargify/manifest.yaml b/airbyte-integrations/connectors/source-chargify/source_chargify/manifest.yaml index 7aaa96a58261..c8895d2e1e06 100644 --- a/airbyte-integrations/connectors/source-chargify/source_chargify/manifest.yaml +++ b/airbyte-integrations/connectors/source-chargify/source_chargify/manifest.yaml @@ -1,125 +1,216 @@ -version: 0.29.0 -type: DeclarativeSource +version: 0.79.1 -definitions: - selector: - type: RecordSelector - extractor: - type: DpathExtractor - field_path: - - "*" - - "{{ parameters.field_path }}" +type: DeclarativeSource - paginator: - type: DefaultPaginator - page_token_option: - type: RequestOption - inject_into: request_parameter - field_name: page - page_size_option: - type: RequestOption - field_name: per_page - inject_into: request_parameter - pagination_strategy: - type: PageIncrement - page_size: 200 - start_from_page: 1 +check: + type: CheckStream + stream_names: + - customers - requester: +definitions: + streams: + customers: + type: DeclarativeStream + name: customers + primary_key: + - id + retriever: + type: SimpleRetriever + requester: + $ref: "#/definitions/base_requester" + path: customers.json + http_method: GET + record_selector: + type: RecordSelector + extractor: + type: DpathExtractor + field_path: + - "*" + - customer + paginator: + type: DefaultPaginator + page_token_option: + type: RequestOption + inject_into: request_parameter + field_name: page + page_size_option: + type: RequestOption + field_name: per_page + inject_into: request_parameter + pagination_strategy: + type: PageIncrement + page_size: 200 + start_from_page: 1 + schema_loader: + type: InlineSchemaLoader + schema: + $ref: "#/schemas/customers" + subscriptions: + type: DeclarativeStream + name: subscriptions + primary_key: + - id + retriever: + type: SimpleRetriever + requester: + $ref: "#/definitions/base_requester" + path: subscriptions.json + http_method: GET + record_selector: + type: RecordSelector + extractor: + type: DpathExtractor + field_path: + - "*" + - subscription + paginator: + type: DefaultPaginator + page_token_option: + type: RequestOption + inject_into: request_parameter + field_name: page + page_size_option: + type: RequestOption + field_name: per_page + inject_into: request_parameter + pagination_strategy: + type: PageIncrement + page_size: 200 + start_from_page: 1 + schema_loader: + type: InlineSchemaLoader + schema: + $ref: "#/schemas/subscriptions" + invoices: + type: DeclarativeStream + name: invoices + primary_key: + - uid + retriever: + type: SimpleRetriever + requester: + $ref: "#/definitions/base_requester" + path: invoices + http_method: GET + record_selector: + type: RecordSelector + extractor: + type: DpathExtractor + field_path: + - invoices.json + paginator: + type: DefaultPaginator + page_token_option: + type: RequestOption + inject_into: request_parameter + field_name: page + page_size_option: + type: RequestOption + field_name: per_page + inject_into: request_parameter + pagination_strategy: + type: PageIncrement + page_size: 200 + start_from_page: 1 + schema_loader: + type: InlineSchemaLoader + schema: + $ref: "#/schemas/invoices" + coupons: + type: DeclarativeStream + name: coupons + primary_key: + - id + retriever: + type: SimpleRetriever + requester: + $ref: "#/definitions/base_requester" + path: coupons.json + http_method: GET + record_selector: + type: RecordSelector + extractor: + type: DpathExtractor + field_path: + - "*" + - coupon + paginator: + type: DefaultPaginator + page_token_option: + type: RequestOption + inject_into: request_parameter + field_name: page + page_size_option: + type: RequestOption + field_name: per_page + inject_into: request_parameter + pagination_strategy: + type: PageIncrement + page_size: 200 + start_from_page: 1 + schema_loader: + type: InlineSchemaLoader + schema: + $ref: "#/schemas/coupons" + transactions: + type: DeclarativeStream + name: transactions + primary_key: + - id + retriever: + type: SimpleRetriever + requester: + $ref: "#/definitions/base_requester" + path: transaction + http_method: GET + record_selector: + type: RecordSelector + extractor: + type: DpathExtractor + field_path: + - "*" + - transactions.json + paginator: + type: DefaultPaginator + page_token_option: + type: RequestOption + inject_into: request_parameter + field_name: page + page_size_option: + type: RequestOption + field_name: per_page + inject_into: request_parameter + pagination_strategy: + type: PageIncrement + page_size: 200 + start_from_page: 1 + schema_loader: + type: InlineSchemaLoader + schema: + $ref: "#/schemas/transactions" + base_requester: type: HttpRequester - url_base: "https://{{ config['domain'] }}/" - path: "{{ parameters.path }}" - http_method: "GET" + url_base: https://{{ config['domain'] }}/ authenticator: type: BasicHttpAuthenticator password: "x" username: "{{ config['api_key'] }}" - retriever: - type: SimpleRetriever - record_selector: - $ref: "#/definitions/selector" - paginator: - $ref: "#/definitions/paginator" - requester: - $ref: "#/definitions/requester" - - base_stream: - type: DeclarativeStream - primary_key: "id" - retriever: - $ref: "#/definitions/retriever" - - customers_stream: - $ref: "#/definitions/base_stream" - name: "customers" - $parameters: - path: "customers.json" - field_path: "customer" - - subscriptions_stream: - $ref: "#/definitions/base_stream" - name: "subscriptions" - $parameters: - path: "subscriptions.json" - field_path: "subscription" - - invoices_stream: - name: "invoices" - type: DeclarativeStream - primary_key: "uid" - retriever: - type: SimpleRetriever - record_selector: - type: RecordSelector - extractor: - type: DpathExtractor - field_path: - - "invoices" - paginator: - $ref: "#/definitions/paginator" - requester: - $ref: "#/definitions/requester" - $parameters: - path: "invoices.json" - field_path: "invoices" - - coupons_stream: - $ref: "#/definitions/base_stream" - name: "coupons" - $parameters: - path: "coupons.json" - field_path: "coupon" - - transactions_stream: - $ref: "#/definitions/base_stream" - name: "transactions" - $parameters: - path: "transactions.json" - field_path: "transaction" - streams: - - "#/definitions/customers_stream" - - "#/definitions/subscriptions_stream" - - "#/definitions/invoices_stream" - - "#/definitions/coupons_stream" - - "#/definitions/transactions_stream" - -check: - type: CheckStream - stream_names: - - customers + - $ref: "#/definitions/streams/customers" + - $ref: "#/definitions/streams/subscriptions" + - $ref: "#/definitions/streams/invoices" + - $ref: "#/definitions/streams/coupons" + - $ref: "#/definitions/streams/transactions" spec: type: Spec - documentation_url: https://docs.airbyte.com/integrations/sources/chargify connection_specification: - title: Chargify Spec type: object + $schema: http://json-schema.org/draft-07/schema# required: - api_key - domain - additionalProperties: true properties: api_key: type: string @@ -131,6 +222,1393 @@ spec: type: string order: 1 title: Domain - description: >- - Chargify domain. Normally this domain follows the following format - companyname.chargify.com + description: Chargify domain. Normally this domain follows the following format + additionalProperties: true + +metadata: + autoImportSchema: + customers: false + subscriptions: false + invoices: false + coupons: false + transactions: false + +schemas: + customers: + type: object + $schema: http://json-schema.org/draft-07/schema# + additionalProperties: true + properties: + address: + type: + - "null" + - string + address_2: + type: + - "null" + - string + cc_emails: + type: + - "null" + - string + city: + type: + - "null" + - string + country: + type: + - "null" + - string + country_name: + type: + - "null" + - string + created_at: + type: + - "null" + - string + format: date-time + default_subscription_group_uid: + type: + - "null" + - string + email: + type: + - "null" + - string + first_name: + type: + - "null" + - string + id: + type: + - "null" + - integer + last_name: + type: + - "null" + - string + locale: + type: + - "null" + - string + organization: + type: + - "null" + - string + parent_id: + type: + - "null" + - integer + phone: + type: + - "null" + - string + portal_customer_created_at: + type: + - "null" + - string + portal_invite_last_accepted_at: + type: + - "null" + - string + portal_invite_last_sent_at: + type: + - "null" + - string + format: date-time + reference: + type: + - "null" + - string + state: + type: + - "null" + - string + state_name: + type: + - "null" + - string + tax_exempt: + type: + - "null" + - boolean + updated_at: + type: + - "null" + - string + format: date-time + vat_number: + type: + - "null" + - string + verified: + type: + - "null" + - string + zip: + type: + - "null" + - string + subscriptions: + type: + - "null" + - object + $parameters: + field_path: subscription + path: subscriptions.json + $schema: http://json-schema.org/draft-07/schema + additionalProperties: true + field_path: subscription + path: subscriptions.json + properties: + activated_at: + type: + - "null" + - string + automatically_resume_at: + type: + - "null" + - string + balance_in_cents: + type: + - "null" + - integer + bank_account: + type: + - "null" + - object + additionalProperties: true + properties: + bank_account_holder_type: + type: + - "null" + - string + bank_account_type: + type: + - "null" + - string + bank_name: + type: + - "null" + - string + billing_address: + type: + - "null" + - string + billing_address_2: + type: + - "null" + - string + billing_city: + type: + - "null" + - string + billing_country: + type: + - "null" + - string + billing_state: + type: + - "null" + - string + billing_zip: + type: + - "null" + - string + chargify_token: + type: + - "null" + - string + current_vault: + type: + - "null" + - string + customer_id: + type: + - "null" + - integer + customer_vault_token: + type: + - "null" + - string + first_name: + type: + - "null" + - string + gateway_handle: + type: + - "null" + - string + id: + type: + - "null" + - integer + last_name: + type: + - "null" + - string + masked_bank_account_number: + type: + - "null" + - string + masked_bank_routing_number: + type: + - "null" + - string + site_gateway_setting_id: + type: + - "null" + - integer + vault_token: + type: + - "null" + - string + cancel_at_end_of_period: + type: + - "null" + - boolean + canceled_at: + type: + - "null" + - string + cancellation_message: + type: + - "null" + - string + cancellation_method: + type: + - "null" + - string + coupon_code: + type: + - "null" + - string + coupon_codes: + type: + - "null" + - array + items: + type: + - "null" + - string + coupon_use_count: + type: + - "null" + - integer + coupon_uses_allowed: + type: + - "null" + - integer + coupons: + type: + - "null" + - array + items: + type: + - "null" + - object + additionalProperties: true + created_at: + type: + - "null" + - string + credit_balance_in_cents: + type: + - "null" + - integer + credit_card: + type: + - "null" + - object + additionalProperties: true + properties: + billing_address: + type: + - "null" + - string + billing_address_2: + type: + - "null" + - string + billing_city: + type: + - "null" + - string + billing_country: + type: + - "null" + - string + billing_state: + type: + - "null" + - string + billing_zip: + type: + - "null" + - string + card_type: + type: + - "null" + - string + chargify_token: + type: + - "null" + - string + current_vault: + type: + - "null" + - string + customer_id: + type: + - "null" + - integer + customer_vault_token: + type: + - "null" + - string + disabled: + type: + - "null" + - boolean + expiration_month: + type: + - "null" + - integer + expiration_year: + type: + - "null" + - integer + first_name: + type: + - "null" + - string + gateway_handle: + type: + - "null" + - string + id: + type: + - "null" + - integer + last_name: + type: + - "null" + - string + masked_card_number: + type: + - "null" + - string + payment_type: + type: + - "null" + - string + site_gateway_setting_id: + type: + - "null" + - integer + vault_token: + type: + - "null" + - string + currency: + type: + - "null" + - string + current_billing_amount_in_cents: + type: + - "null" + - integer + current_period_ends_at: + type: + - "null" + - string + current_period_started_at: + type: + - "null" + - string + customer: + type: + - "null" + - object + additionalProperties: true + properties: + address: + type: + - "null" + - string + address_2: + type: + - "null" + - string + cc_emails: + type: + - "null" + - string + city: + type: + - "null" + - string + country: + type: + - "null" + - string + country_name: + type: + - "null" + - string + created_at: + type: + - "null" + - string + default_subscription_group_uid: + type: + - "null" + - string + email: + type: + - "null" + - string + first_name: + type: + - "null" + - string + id: + type: + - "null" + - integer + last_name: + type: + - "null" + - string + locale: + type: + - "null" + - string + organization: + type: + - "null" + - string + parent_id: + type: + - "null" + - integer + phone: + type: + - "null" + - string + portal_customer_created_at: + type: + - "null" + - string + portal_invite_last_accepted_at: + type: + - "null" + - string + portal_invite_last_sent_at: + type: + - "null" + - string + reference: + type: + - "null" + - string + state: + type: + - "null" + - string + state_name: + type: + - "null" + - string + tax_exempt: + type: + - "null" + - boolean + updated_at: + type: + - "null" + - string + vat_number: + type: + - "null" + - string + verified: + type: + - "null" + - boolean + zip: + type: + - "null" + - string + delayed_cancel_at: + type: + - "null" + - string + dunning_communication_delay_enabled: + type: + - "null" + - boolean + dunning_communication_delay_time_zone: + type: + - "null" + - string + expires_at: + type: + - "null" + - string + group: + type: + - "null" + - object + additionalProperties: true + properties: + primary: + type: + - "null" + - string + primary_subscription_id: + type: + - "null" + - string + scheme: + type: + - "null" + - string + uid: + type: + - "null" + - string + id: + type: + - "null" + - integer + locale: + type: + - "null" + - string + net_terms: + type: + - "null" + - integer + next_assessment_at: + type: + - "null" + - string + next_product_handle: + type: + - "null" + - string + next_product_id: + type: + - "null" + - integer + next_product_price_point_id: + type: + - "null" + - integer + offer_id: + type: + - "null" + - integer + on_hold_at: + type: + - "null" + - string + payer_id: + type: + - "null" + - integer + payment_collection_method: + type: + - "null" + - string + payment_type: + type: + - "null" + - string + prepaid_dunning: + type: + - "null" + - boolean + prepayment_balance_in_cents: + type: + - "null" + - integer + previous_state: + type: + - "null" + - string + product: + type: + - "null" + - object + additionalProperties: true + properties: + accounting_code: + type: + - "null" + - string + archived_at: + type: + - "null" + - string + created_at: + type: + - "null" + - string + default_product_price_point_id: + type: + - "null" + - integer + description: + type: + - "null" + - string + expiration_interval: + type: + - "null" + - integer + expiration_interval_unit: + type: + - "null" + - string + handle: + type: + - "null" + - string + id: + type: + - "null" + - integer + initial_charge_after_trial: + type: + - "null" + - boolean + initial_charge_in_cents: + type: + - "null" + - integer + interval: + type: + - "null" + - integer + interval_unit: + type: + - "null" + - string + name: + type: + - "null" + - string + price_in_cents: + type: + - "null" + - integer + product_family: + type: + - "null" + - object + additionalProperties: true + properties: + accounting_code: + type: + - "null" + - string + created_at: + type: + - "null" + - string + description: + type: + - "null" + - string + handle: + type: + - "null" + - string + id: + type: + - "null" + - integer + name: + type: + - "null" + - string + updated_at: + type: + - "null" + - string + product_price_point_name: + type: + - "null" + - string + public_signup_pages: + type: + - "null" + - array + items: + anyOf: + - type: + - "null" + - object + additionalProperties: true + properties: + id: + type: + - "null" + - integer + return_params: + type: + - "null" + - string + return_url: + type: + - "null" + - string + url: + type: + - "null" + - string + request_billing_address: + type: + - "null" + - boolean + request_credit_card: + type: + - "null" + - boolean + require_billing_address: + type: + - "null" + - boolean + require_credit_card: + type: + - "null" + - boolean + require_shipping_address: + type: + - "null" + - boolean + return_params: + type: + - "null" + - string + tax_code: + type: + - "null" + - string + taxable: + type: + - "null" + - boolean + trial_interval: + type: + - "null" + - integer + trial_interval_unit: + type: + - "null" + - string + trial_price_in_cents: + type: + - "null" + - integer + update_return_params: + type: + - "null" + - string + update_return_url: + type: + - "null" + - string + updated_at: + type: + - "null" + - string + version_number: + type: + - "null" + - integer + product_price_in_cents: + type: + - "null" + - integer + product_price_point_id: + type: + - "null" + - integer + product_price_point_type: + type: + - "null" + - string + product_version_number: + type: + - "null" + - integer + reason_code: + type: + - "null" + - string + receives_invoice_emails: + type: + - "null" + - boolean + reference: + type: + - "null" + - string + referral_code: + type: + - "null" + - string + scheduled_cancellation_at: + type: + - "null" + - string + signup_payment_id: + type: + - "null" + - integer + signup_revenue: + type: + - "null" + - string + snap_day: + type: + - "null" + - string + state: + type: + - "null" + - string + stored_credential_transaction_id: + type: + - "null" + - integer + total_revenue_in_cents: + type: + - "null" + - integer + trial_ended_at: + type: + - "null" + - string + trial_started_at: + type: + - "null" + - string + updated_at: + type: + - "null" + - string + invoices: + type: object + $schema: http://json-schema.org/draft-07/schema# + additionalProperties: true + properties: + billing_address: + type: + - "null" + - object + additionalProperties: true + properties: + city: + type: + - "null" + - string + country: + type: + - "null" + - string + line2: + type: + - "null" + - string + state: + type: + - "null" + - string + street: + type: + - "null" + - string + zip: + type: + - "null" + - string + collection_method: + type: + - "null" + - string + consolidation_level: + type: + - "null" + - string + credit_amount: + type: + - "null" + - string + currency: + type: + - "null" + - string + customer: + type: + - "null" + - object + additionalProperties: true + properties: + chargify_id: + type: + - "null" + - integer + email: + type: + - "null" + - string + first_name: + type: + - "null" + - string + last_name: + type: + - "null" + - string + organization: + type: + - "null" + - string + customer_id: + type: + - "null" + - integer + discount_amount: + type: + - "null" + - string + due_amount: + type: + - "null" + - string + due_date: + type: + - "null" + - string + format: date + group_primary_subscription_id: + type: + - "null" + - integer + issue_date: + type: + - "null" + - string + format: date + memo: + type: + - "null" + - string + number: + type: + - "null" + - string + paid_amount: + type: + - "null" + - string + paid_date: + type: + - "null" + - string + format: date + parent_invoice_number: + type: + - "null" + - integer + parent_invoice_uid: + type: + - "null" + - integer + payment_instructions: + type: + - "null" + - string + product_family_name: + type: + - "null" + - string + product_name: + type: + - "null" + - string + refund_amount: + type: + - "null" + - string + seller: + type: + - "null" + - object + additionalProperties: true + properties: + address: + type: + - "null" + - object + additionalProperties: true + properties: + city: + type: + - "null" + - string + country: + type: + - "null" + - string + line2: + type: + - "null" + - string + state: + type: + - "null" + - string + street: + type: + - "null" + - string + zip: + type: + - "null" + - string + name: + type: + - "null" + - string + phone: + type: + - "null" + - string + sequence_number: + type: + - "null" + - integer + shipping_address: + type: + - "null" + - object + additionalProperties: true + properties: + city: + type: + - "null" + - string + country: + type: + - "null" + - string + line2: + type: + - "null" + - string + state: + type: + - "null" + - string + street: + type: + - "null" + - string + zip: + type: + - "null" + - string + site_id: + type: + - "null" + - integer + status: + type: + - "null" + - string + subscription_id: + type: + - "null" + - integer + subtotal_amount: + type: + - "null" + - string + tax_amount: + type: + - "null" + - string + total_amount: + type: + - "null" + - string + uid: + type: + - "null" + - string + coupons: + type: object + $schema: http://json-schema.org/draft-07/schema# + additionalProperties: true + properties: + allow_negative_balance: + type: + - "null" + - boolean + amount: + type: + - "null" + - integer + amount_in_cents: + type: + - "null" + - integer + "apply_on_cancel_at_end_of_period ": + type: + - "null" + - boolean + archived_at: + type: + - "null" + - string + code: + type: + - "null" + - string + compounding_strategy: + type: + - "null" + - string + conversion_limit: + type: + - "null" + - string + coupon_restrictions: + type: + - "null" + - array + items: + type: + - "null" + - object + additionalProperties: true + properties: + handle: + type: + - "null" + - string + id: + type: + - "null" + - string + item_id: + type: + - "null" + - integer + item_type: + type: + - "null" + - string + name: + type: + - "null" + - string + created_at: + type: + - "null" + - string + description: + type: + - "null" + - string + discount_type: + type: + - "null" + - string + duration_interval: + type: + - "null" + - integer + duration_interval_span: + type: + - "null" + - string + duration_interval_unit: + type: + - "null" + - string + duration_period_count: + type: + - "null" + - integer + end_date: + type: + - "null" + - string + exclude_mid_period_allocations: + type: + - "null" + - boolean + id: + type: + - "null" + - integer + name: + type: + - "null" + - string + percentage: + type: + - "null" + - integer + product_family_id: + type: + - "null" + - integer + product_family_name: + type: + - "null" + - string + recurring: + type: + - "null" + - boolean + recurring_scheme: + type: + - "null" + - string + stackable: + type: + - "null" + - boolean + start_date: + type: + - "null" + - string + updated_at: + type: + - "null" + - string + use_site_exchange_rate: + type: + - "null" + - boolean + transactions: + type: object + $schema: http://json-schema.org/draft-07/schema# + additionalProperties: true + properties: + type: + type: + - "null" + - string + amount_in_cents: + type: + - "null" + - integer + card_expiration: + type: + - "null" + - string + card_number: + type: + - "null" + - string + card_type: + type: + - "null" + - string + component_id: + type: + - "null" + - integer + created_at: + type: + - "null" + - string + customer_id: + type: + - "null" + - integer + ending_balance_in_cents: + type: + - "null" + - integer + gateway_order_id: + type: + - "null" + - integer + gateway_transaction_id: + type: + - "null" + - string + gateway_used: + type: + - "null" + - string + id: + type: + - "null" + - integer + item_name: + type: + - "null" + - string + kind: + type: + - "null" + - string + memo: + type: + - "null" + - string + parent_id: + type: + - "null" + - integer + payment_id: + type: + - "null" + - integer + product_id: + type: + - "null" + - integer + refunded_amount_in_cents: + type: + - "null" + - integer + role: + type: + - "null" + - string + starting_balance_in_cents: + type: + - "null" + - integer + statement_id: + type: + - "null" + - integer + subscription_id: + type: + - "null" + - integer + success: + type: + - "null" + - boolean + tax_id: + type: + - "null" + - integer + transaction_type: + type: + - "null" + - string diff --git a/airbyte-integrations/connectors/source-chargify/source_chargify/run.py b/airbyte-integrations/connectors/source-chargify/source_chargify/run.py index 88f4450c9bcf..42414c1b3f5a 100644 --- a/airbyte-integrations/connectors/source-chargify/source_chargify/run.py +++ b/airbyte-integrations/connectors/source-chargify/source_chargify/run.py @@ -1,12 +1,13 @@ # -# Copyright (c) 2023 Airbyte, Inc., all rights reserved. +# Copyright (c) 2024 Airbyte, Inc., all rights reserved. # import sys from airbyte_cdk.entrypoint import launch -from source_chargify import SourceChargify + +from .source import SourceChargify def run(): diff --git a/airbyte-integrations/connectors/source-chargify/source_chargify/schemas/coupons.json b/airbyte-integrations/connectors/source-chargify/source_chargify/schemas/coupons.json deleted file mode 100644 index 067416b2d9d8..000000000000 --- a/airbyte-integrations/connectors/source-chargify/source_chargify/schemas/coupons.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": true, - "properties": { - "id": { "type": ["null", "integer"] }, - "name": { "type": ["null", "string"] }, - "code": { "type": ["null", "string"] }, - "description": { "type": ["null", "string"] }, - "amount": { "type": ["null", "integer"] }, - "amount_in_cents": { "type": ["null", "integer"] }, - "product_family_id": { "type": ["null", "integer"] }, - "product_family_name": { "type": ["null", "string"] }, - "start_date": { "type": ["null", "string"] }, - "end_date": { "type": ["null", "string"] }, - "percentage": { "type": ["null", "integer"] }, - "recurring": { "type": ["null", "boolean"] }, - "recurring_scheme": { "type": ["null", "string"] }, - "duration_period_count": { "type": ["null", "integer"] }, - "duration_interval": { "type": ["null", "integer"] }, - "duration_interval_unit": { "type": ["null", "string"] }, - "duration_interval_span": { "type": ["null", "string"] }, - "allow_negative_balance": { "type": ["null", "boolean"] }, - "archived_at": { "type": ["null", "string"] }, - "conversion_limit": { "type": ["null", "string"] }, - "stackable": { "type": ["null", "boolean"] }, - "compounding_strategy": { "type": ["null", "string"] }, - "use_site_exchange_rate": { "type": ["null", "boolean"] }, - "created_at": { "type": ["null", "string"] }, - "updated_at": { "type": ["null", "string"] }, - "discount_type": { "type": ["null", "string"] }, - "exclude_mid_period_allocations": { "type": ["null", "boolean"] }, - "apply_on_cancel_at_end_of_period ": { "type": ["null", "boolean"] }, - "coupon_restrictions": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "additionalProperties": true, - "properties": { - "id": { "type": ["null", "string"] }, - "item_type": { "type": ["null", "string"] }, - "item_id": { "type": ["null", "integer"] }, - "name": { "type": ["null", "string"] }, - "handle": { "type": ["null", "string"] } - } - } - } - } -} diff --git a/airbyte-integrations/connectors/source-chargify/source_chargify/schemas/customers.json b/airbyte-integrations/connectors/source-chargify/source_chargify/schemas/customers.json deleted file mode 100644 index 21003d566321..000000000000 --- a/airbyte-integrations/connectors/source-chargify/source_chargify/schemas/customers.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": true, - "properties": { - "default_subscription_group_uid": { - "type": ["null", "string"] - }, - "portal_invite_last_sent_at": { - "type": ["null", "string"], - "format": "date-time" - }, - "vat_number": { - "type": ["null", "string"] - }, - "email": { - "type": ["null", "string"] - }, - "created_at": { - "type": ["null", "string"], - "format": "date-time" - }, - "zip": { - "type": ["null", "string"] - }, - "first_name": { - "type": ["null", "string"] - }, - "country_name": { - "type": ["null", "string"] - }, - "state": { - "type": ["null", "string"] - }, - "city": { - "type": ["null", "string"] - }, - "parent_id": { - "type": ["null", "integer"] - }, - "locale": { - "type": ["null", "string"] - }, - "portal_customer_created_at": { - "type": ["null", "string"] - }, - "updated_at": { - "type": ["null", "string"], - "format": "date-time" - }, - "country": { - "type": ["null", "string"] - }, - "portal_invite_last_accepted_at": { - "type": ["null", "string"] - }, - "tax_exempt": { - "type": ["null", "boolean"] - }, - "id": { - "type": ["null", "integer"] - }, - "reference": { - "type": ["null", "string"] - }, - "last_name": { - "type": ["null", "string"] - }, - "address_2": { - "type": ["null", "string"] - }, - "phone": { - "type": ["null", "string"] - }, - "organization": { - "type": ["null", "string"] - }, - "address": { - "type": ["null", "string"] - }, - "verified": { - "type": ["null", "string"] - }, - "cc_emails": { - "type": ["null", "string"] - }, - "state_name": { - "type": ["null", "string"] - } - } -} diff --git a/airbyte-integrations/connectors/source-chargify/source_chargify/schemas/invoices.json b/airbyte-integrations/connectors/source-chargify/source_chargify/schemas/invoices.json deleted file mode 100644 index 7017fbc749cf..000000000000 --- a/airbyte-integrations/connectors/source-chargify/source_chargify/schemas/invoices.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": true, - "properties": { - "uid": { "type": ["null", "string"] }, - "site_id": { "type": ["null", "integer"] }, - "customer_id": { "type": ["null", "integer"] }, - "subscription_id": { "type": ["null", "integer"] }, - "number": { "type": ["null", "string"] }, - "sequence_number": { "type": ["null", "integer"] }, - "issue_date": { "type": ["null", "string"], "format": "date" }, - "due_date": { "type": ["null", "string"], "format": "date" }, - "paid_date": { "type": ["null", "string"], "format": "date" }, - "status": { "type": ["null", "string"] }, - "collection_method": { "type": ["null", "string"] }, - "payment_instructions": { "type": ["null", "string"] }, - "currency": { "type": ["null", "string"] }, - "consolidation_level": { "type": ["null", "string"] }, - "parent_invoice_uid": { "type": ["null", "integer"] }, - "parent_invoice_number": { "type": ["null", "integer"] }, - "group_primary_subscription_id": { "type": ["null", "integer"] }, - "product_name": { "type": ["null", "string"] }, - "product_family_name": { "type": ["null", "string"] }, - "seller": { - "type": ["null", "object"], - "additionalProperties": true, - "properties": { - "name": { "type": ["null", "string"] }, - "address": { - "type": ["null", "object"], - "additionalProperties": true, - "properties": { - "street": { "type": ["null", "string"] }, - "line2": { "type": ["null", "string"] }, - "city": { "type": ["null", "string"] }, - "state": { "type": ["null", "string"] }, - "zip": { "type": ["null", "string"] }, - "country": { "type": ["null", "string"] } - } - }, - "phone": { "type": ["null", "string"] } - } - }, - "customer": { - "type": ["null", "object"], - "additionalProperties": true, - "properties": { - "chargify_id": { "type": ["null", "integer"] }, - "first_name": { "type": ["null", "string"] }, - "last_name": { "type": ["null", "string"] }, - "organization": { "type": ["null", "string"] }, - "email": { "type": ["null", "string"] } - } - }, - "memo": { "type": ["null", "string"] }, - "billing_address": { - "type": ["null", "object"], - "additionalProperties": true, - "properties": { - "street": { "type": ["null", "string"] }, - "line2": { "type": ["null", "string"] }, - "city": { "type": ["null", "string"] }, - "state": { "type": ["null", "string"] }, - "zip": { "type": ["null", "string"] }, - "country": { "type": ["null", "string"] } - } - }, - "shipping_address": { - "type": ["null", "object"], - "additionalProperties": true, - "properties": { - "street": { "type": ["null", "string"] }, - "line2": { "type": ["null", "string"] }, - "city": { "type": ["null", "string"] }, - "state": { "type": ["null", "string"] }, - "zip": { "type": ["null", "string"] }, - "country": { "type": ["null", "string"] } - } - }, - "subtotal_amount": { "type": ["null", "string"] }, - "discount_amount": { "type": ["null", "string"] }, - "tax_amount": { "type": ["null", "string"] }, - "total_amount": { "type": ["null", "string"] }, - "credit_amount": { "type": ["null", "string"] }, - "paid_amount": { "type": ["null", "string"] }, - "refund_amount": { "type": ["null", "string"] }, - "due_amount": { "type": ["null", "string"] } - } -} diff --git a/airbyte-integrations/connectors/source-chargify/source_chargify/schemas/subscriptions.json b/airbyte-integrations/connectors/source-chargify/source_chargify/schemas/subscriptions.json deleted file mode 100644 index 683601fbfa58..000000000000 --- a/airbyte-integrations/connectors/source-chargify/source_chargify/schemas/subscriptions.json +++ /dev/null @@ -1,576 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema", - "type": ["null", "object"], - "additionalProperties": true, - "properties": { - "id": { - "type": ["null", "integer"] - }, - "state": { - "type": ["null", "string"] - }, - "balance_in_cents": { - "type": ["null", "integer"] - }, - "total_revenue_in_cents": { - "type": ["null", "integer"] - }, - "product_price_in_cents": { - "type": ["null", "integer"] - }, - "product_version_number": { - "type": ["null", "integer"] - }, - "current_period_ends_at": { - "type": ["null", "string"] - }, - "next_assessment_at": { - "type": ["null", "string"] - }, - "trial_started_at": { - "type": ["null", "string"] - }, - "credit_balance_in_cents": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - }, - "locale": { - "type": ["null", "string"] - }, - "prepayment_balance_in_cents": { - "type": ["null", "integer"] - }, - "receives_invoice_emails": { - "type": ["null", "boolean"] - }, - "scheduled_cancellation_at": { - "type": ["null", "string"] - }, - "trial_ended_at": { - "type": ["null", "string"] - }, - "activated_at": { - "type": ["null", "string"] - }, - "expires_at": { - "type": ["null", "string"] - }, - "created_at": { - "type": ["null", "string"] - }, - "updated_at": { - "type": ["null", "string"] - }, - "cancellation_message": { - "type": ["null", "string"] - }, - "cancellation_method": { - "type": ["null", "string"] - }, - "cancel_at_end_of_period": { - "type": ["null", "boolean"] - }, - "canceled_at": { - "type": ["null", "string"] - }, - "current_period_started_at": { - "type": ["null", "string"] - }, - "previous_state": { - "type": ["null", "string"] - }, - "signup_payment_id": { - "type": ["null", "integer"] - }, - "signup_revenue": { - "type": ["null", "string"] - }, - "delayed_cancel_at": { - "type": ["null", "string"] - }, - "coupon_code": { - "type": ["null", "string"] - }, - "snap_day": { - "type": ["null", "string"] - }, - "payment_collection_method": { - "type": ["null", "string"] - }, - "customer": { - "type": ["null", "object"], - "additionalProperties": true, - "properties": { - "first_name": { - "type": ["null", "string"] - }, - "last_name": { - "type": ["null", "string"] - }, - "email": { - "type": ["null", "string"] - }, - "cc_emails": { - "type": ["null", "string"] - }, - "organization": { - "type": ["null", "string"] - }, - "reference": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "integer"] - }, - "created_at": { - "type": ["null", "string"] - }, - "updated_at": { - "type": ["null", "string"] - }, - "address": { - "type": ["null", "string"] - }, - "address_2": { - "type": ["null", "string"] - }, - "city": { - "type": ["null", "string"] - }, - "state": { - "type": ["null", "string"] - }, - "state_name": { - "type": ["null", "string"] - }, - "zip": { - "type": ["null", "string"] - }, - "country": { - "type": ["null", "string"] - }, - "country_name": { - "type": ["null", "string"] - }, - "phone": { - "type": ["null", "string"] - }, - "verified": { - "type": ["null", "boolean"] - }, - "portal_customer_created_at": { - "type": ["null", "string"] - }, - "portal_invite_last_sent_at": { - "type": ["null", "string"] - }, - "portal_invite_last_accepted_at": { - "type": ["null", "string"] - }, - "tax_exempt": { - "type": ["null", "boolean"] - }, - "vat_number": { - "type": ["null", "string"] - }, - "parent_id": { - "type": ["null", "integer"] - }, - "locale": { - "type": ["null", "string"] - }, - "default_subscription_group_uid": { - "type": ["null", "string"] - } - } - }, - "product": { - "type": ["null", "object"], - "additionalProperties": true, - "properties": { - "id": { - "type": ["null", "integer"] - }, - "name": { - "type": ["null", "string"] - }, - "handle": { - "type": ["null", "string"] - }, - "description": { - "type": ["null", "string"] - }, - "accounting_code": { - "type": ["null", "string"] - }, - "request_credit_card": { - "type": ["null", "boolean"] - }, - "expiration_interval": { - "type": ["null", "integer"] - }, - "expiration_interval_unit": { - "type": ["null", "string"] - }, - "created_at": { - "type": ["null", "string"] - }, - "updated_at": { - "type": ["null", "string"] - }, - "price_in_cents": { - "type": ["null", "integer"] - }, - "interval": { - "type": ["null", "integer"] - }, - "interval_unit": { - "type": ["null", "string"] - }, - "initial_charge_in_cents": { - "type": ["null", "integer"] - }, - "trial_price_in_cents": { - "type": ["null", "integer"] - }, - "trial_interval": { - "type": ["null", "integer"] - }, - "trial_interval_unit": { - "type": ["null", "string"] - }, - "archived_at": { - "type": ["null", "string"] - }, - "require_credit_card": { - "type": ["null", "boolean"] - }, - "return_params": { - "type": ["null", "string"] - }, - "taxable": { - "type": ["null", "boolean"] - }, - "update_return_url": { - "type": ["null", "string"] - }, - "initial_charge_after_trial": { - "type": ["null", "boolean"] - }, - "version_number": { - "type": ["null", "integer"] - }, - "update_return_params": { - "type": ["null", "string"] - }, - "product_family": { - "type": ["null", "object"], - "additionalProperties": true, - "properties": { - "id": { - "type": ["null", "integer"] - }, - "name": { - "type": ["null", "string"] - }, - "handle": { - "type": ["null", "string"] - }, - "accounting_code": { - "type": ["null", "string"] - }, - "description": { - "type": ["null", "string"] - }, - "created_at": { - "type": ["null", "string"] - }, - "updated_at": { - "type": ["null", "string"] - } - } - }, - "public_signup_pages": { - "type": ["null", "array"], - "items": { - "anyOf": [ - { - "type": ["null", "object"], - "additionalProperties": true, - "properties": { - "id": { - "type": ["null", "integer"] - }, - "return_url": { - "type": ["null", "string"] - }, - "return_params": { - "type": ["null", "string"] - }, - "url": { - "type": ["null", "string"] - } - } - } - ] - } - }, - "product_price_point_name": { - "type": ["null", "string"] - }, - "request_billing_address": { - "type": ["null", "boolean"] - }, - "require_billing_address": { - "type": ["null", "boolean"] - }, - "require_shipping_address": { - "type": ["null", "boolean"] - }, - "tax_code": { - "type": ["null", "string"] - }, - "default_product_price_point_id": { - "type": ["null", "integer"] - } - } - }, - "credit_card": { - "type": ["null", "object"], - "additionalProperties": true, - "properties": { - "id": { - "type": ["null", "integer"] - }, - "first_name": { - "type": ["null", "string"] - }, - "last_name": { - "type": ["null", "string"] - }, - "masked_card_number": { - "type": ["null", "string"] - }, - "card_type": { - "type": ["null", "string"] - }, - "expiration_month": { - "type": ["null", "integer"] - }, - "expiration_year": { - "type": ["null", "integer"] - }, - "customer_id": { - "type": ["null", "integer"] - }, - "current_vault": { - "type": ["null", "string"] - }, - "vault_token": { - "type": ["null", "string"] - }, - "billing_address": { - "type": ["null", "string"] - }, - "billing_city": { - "type": ["null", "string"] - }, - "billing_state": { - "type": ["null", "string"] - }, - "billing_zip": { - "type": ["null", "string"] - }, - "billing_country": { - "type": ["null", "string"] - }, - "customer_vault_token": { - "type": ["null", "string"] - }, - "billing_address_2": { - "type": ["null", "string"] - }, - "payment_type": { - "type": ["null", "string"] - }, - "disabled": { - "type": ["null", "boolean"] - }, - "chargify_token": { - "type": ["null", "string"] - }, - "site_gateway_setting_id": { - "type": ["null", "integer"] - }, - "gateway_handle": { - "type": ["null", "string"] - } - } - }, - "group": { - "type": ["null", "object"], - "additionalProperties": true, - "properties": { - "uid": { - "type": ["null", "string"] - }, - "scheme": { - "type": ["null", "string"] - }, - "primary_subscription_id": { - "type": ["null", "string"] - }, - "primary": { - "type": ["null", "string"] - } - } - }, - "bank_account": { - "type": ["null", "object"], - "additionalProperties": true, - "properties": { - "bank_account_holder_type": { - "type": ["null", "string"] - }, - "bank_account_type": { - "type": ["null", "string"] - }, - "bank_name": { - "type": ["null", "string"] - }, - "billing_address": { - "type": ["null", "string"] - }, - "billing_address_2": { - "type": ["null", "string"] - }, - "billing_city": { - "type": ["null", "string"] - }, - "billing_state": { - "type": ["null", "string"] - }, - "billing_zip": { - "type": ["null", "string"] - }, - "billing_country": { - "type": ["null", "string"] - }, - "current_vault": { - "type": ["null", "string"] - }, - "customer_id": { - "type": ["null", "integer"] - }, - "customer_vault_token": { - "type": ["null", "string"] - }, - "first_name": { - "type": ["null", "string"] - }, - "last_name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "integer"] - }, - "masked_bank_account_number": { - "type": ["null", "string"] - }, - "masked_bank_routing_number": { - "type": ["null", "string"] - }, - "vault_token": { - "type": ["null", "string"] - }, - "chargify_token": { - "type": ["null", "string"] - }, - "site_gateway_setting_id": { - "type": ["null", "integer"] - }, - "gateway_handle": { - "type": ["null", "string"] - } - } - }, - "payment_type": { - "type": ["null", "string"] - }, - "referral_code": { - "type": ["null", "string"] - }, - "next_product_id": { - "type": ["null", "integer"] - }, - "next_product_handle": { - "type": ["null", "string"] - }, - "coupon_use_count": { - "type": ["null", "integer"] - }, - "coupon_uses_allowed": { - "type": ["null", "integer"] - }, - "product_price_point_type": { - "type": ["null", "string"] - }, - "coupons": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "additionalProperties": true - } - }, - "reason_code": { - "type": ["null", "string"] - }, - "automatically_resume_at": { - "type": ["null", "string"] - }, - "coupon_codes": { - "type": ["null", "array"], - "items": { - "type": ["null", "string"] - } - }, - "offer_id": { - "type": ["null", "integer"] - }, - "payer_id": { - "type": ["null", "integer"] - }, - "current_billing_amount_in_cents": { - "type": ["null", "integer"] - }, - "product_price_point_id": { - "type": ["null", "integer"] - }, - "next_product_price_point_id": { - "type": ["null", "integer"] - }, - "net_terms": { - "type": ["null", "integer"] - }, - "stored_credential_transaction_id": { - "type": ["null", "integer"] - }, - "reference": { - "type": ["null", "string"] - }, - "on_hold_at": { - "type": ["null", "string"] - }, - "prepaid_dunning": { - "type": ["null", "boolean"] - }, - "dunning_communication_delay_enabled": { - "type": ["null", "boolean"] - }, - "dunning_communication_delay_time_zone": { - "type": ["null", "string"] - } - } -} diff --git a/airbyte-integrations/connectors/source-chargify/source_chargify/schemas/transactions.json b/airbyte-integrations/connectors/source-chargify/source_chargify/schemas/transactions.json deleted file mode 100644 index 2dbd4518e142..000000000000 --- a/airbyte-integrations/connectors/source-chargify/source_chargify/schemas/transactions.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": true, - "properties": { - "id": { "type": ["null", "integer"] }, - "subscription_id": { "type": ["null", "integer"] }, - "type": { "type": ["null", "string"] }, - "kind": { "type": ["null", "string"] }, - "transaction_type": { "type": ["null", "string"] }, - "success": { "type": ["null", "boolean"] }, - "amount_in_cents": { "type": ["null", "integer"] }, - "memo": { "type": ["null", "string"] }, - "created_at": { "type": ["null", "string"] }, - "starting_balance_in_cents": { "type": ["null", "integer"] }, - "ending_balance_in_cents": { "type": ["null", "integer"] }, - "gateway_used": { "type": ["null", "string"] }, - "gateway_transaction_id": { "type": ["null", "string"] }, - "gateway_order_id": { "type": ["null", "integer"] }, - "payment_id": { "type": ["null", "integer"] }, - "product_id": { "type": ["null", "integer"] }, - "tax_id": { "type": ["null", "integer"] }, - "component_id": { "type": ["null", "integer"] }, - "statement_id": { "type": ["null", "integer"] }, - "customer_id": { "type": ["null", "integer"] }, - "item_name": { "type": ["null", "string"] }, - "parent_id": { "type": ["null", "integer"] }, - "role": { "type": ["null", "string"] }, - "card_number": { "type": ["null", "string"] }, - "card_expiration": { "type": ["null", "string"] }, - "card_type": { "type": ["null", "string"] }, - "refunded_amount_in_cents": { "type": ["null", "integer"] } - } -} diff --git a/airbyte-integrations/connectors/source-chargify/source_chargify/source.py b/airbyte-integrations/connectors/source-chargify/source_chargify/source.py index 7c9d8f287428..60b6d2fe6754 100644 --- a/airbyte-integrations/connectors/source-chargify/source_chargify/source.py +++ b/airbyte-integrations/connectors/source-chargify/source_chargify/source.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2023 Airbyte, Inc., all rights reserved. +# Copyright (c) 2024 Airbyte, Inc., all rights reserved. # from airbyte_cdk.sources.declarative.yaml_declarative_source import YamlDeclarativeSource diff --git a/docs/integrations/sources/chargify.md b/docs/integrations/sources/chargify.md index bd4717a45403..342b61853ee5 100644 --- a/docs/integrations/sources/chargify.md +++ b/docs/integrations/sources/chargify.md @@ -45,6 +45,7 @@ Please follow the [Chargify documentation for generating an API key](https://dev | Version | Date | Pull Request | Subject | | :------ | :--------- | :------------------------------------------------------- | :------------------------------------------ | +| 0.4.3 | 2024-06-15 | [38814](https://github.com/airbytehq/airbyte/pull/38814) | Make connector compatible with builder | | 0.4.2 | 2024-06-06 | [39306](https://github.com/airbytehq/airbyte/pull/39306) | [autopull] Upgrade base image to v1.2.2 | | 0.4.1 | 2024-05-20 | [38444](https://github.com/airbytehq/airbyte/pull/38444) | [autopull] base image + poetry + up_to_date | | 0.4.0 | 2023-10-16 | [31116](https://github.com/airbytehq/airbyte/pull/31116) | Add Coupons, Transactions, Invoices Streams |