Skip to content

singer-io/tap-quickbooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tap-quickbooks

This tap is in development.

This is a Singer tap that produces JSON-formatted data following the Singer spec.

Description

This tap:

  • Pulls raw data from Quickbooks API

  • Extracts from the following sources to produce streams. Below is a list of all the streams available. See the streams file for a list of classes where each one has a constant indiciating if the stream's replication_method is INCREMENTAL or FULL_TABLE and what is the replication_key.

    • Stream
    • Accounts
    • Budgets
    • Classes
    • CreditMemos
    • BillPayments
    • SalesReceipts
    • Purchases
    • Payments
    • PurchaseOrders
    • PaymentMethods
    • JournalEntries
    • Items
    • Invoices
    • Customers
    • RefundReceipts
    • Deposits
    • Departments
    • Employees
    • Estimates
    • Bills
    • TaxAgencies
    • TaxCodes
    • TaxRates
    • Terms
    • TimeActivities
    • Transfers
    • VendorCredits
    • Vendors
    • ProfitAndLossReport
    • DeletedObjects
  • Includes a schema for each resource reflecting most recent tested data retrieved using the api. See the schema folder for details.

  • Incrementally pulls data based on the input state

Authentication

Authentication is handled with oauth v2. In the tap configuration the following fields are required for authentication to work correctly:

  • client_id
  • client_secret
  • refresh_token

These values are all obtained from the oauth steps documented on quickbook's documentation page.

Quick Start

  1. Install

    Clone this repository, and then install using setup.py. We recommend using a virtualenv:

    $ virtualenv -p python3 venv
    $ source venv/bin/activate
    $ pip install -e .
  2. Create your tap's config.json file. The tap config file for this tap should include these entries:

    • start_date - The default value to use if no bookmark exists for an endpoint (rfc3339 date string)
    • user_agent (string): Process and email for API logging purposes. Example: tap-quickbooks <api_user_email@your_company.com>
    • realm_id (string): The realm id of the company to fetch the data from.
    • client_secret (string): Credentials of the client app.
    • client_id (string): Id of the client app.
    • refresh_token (string): Token to get a new Access token if it expires.
    • sandbox (string, optional): Whether to communicate with quickbooks's sandbox or prod account for this application. If you're not sure leave out. Defaults to false.
    • The request_timeout is an optional paramater to set timeout for requests. Default: 300 seconds

    And the other values mentioned in the authentication section above.

    {
    	"client_id": "<app_id>",
    	"start_date": "2020-08-21T00:00:00Z",
    	"refresh_token": "<refresh_token>",
    	"client_secret": "<app_secret>",
    	"realm_id": "0123456789",
    	"sandbox": "<true|false>",
    	"user_agent": "Stitch Tap (+support@stitchdata.com)",
    	"request_timeout": 300
    }
  3. Run the Tap in Discovery Mode This creates a catalog.json for selecting objects/fields to integrate:

    tap-quickbooks --config config.json --discover > catalog.json

    See the Singer docs on discovery mode here.

  4. Run the Tap in Sync Mode (with catalog) and write out to state file

    For Sync mode:

    $ tap-quickbooks --config tap_config.json --catalog catalog.json >> state.json
    $ tail -1 state.json > state.json.tmp && mv state.json.tmp state.json

    To load to json files to verify outputs:

    $ tap-quickbooks --config tap_config.json --catalog catalog.json | target-json >> state.json
    $ tail -1 state.json > state.json.tmp && mv state.json.tmp state.json

    To pseudo-load to Stitch Import API with dry run:

    $ tap-quickbooks --config tap_config.json --catalog catalog.json | target-stitch --config target_config.json --dry-run >> state.json
    $ tail -1 state.json > state.json.tmp && mv state.json.tmp state.json
    

Copyright © 2020 Stitch