ExQuickBooks v0.3.0 ExQuickBooks

API client for QuickBooks Online.

Configuration

You can configure the application through Mix.Config:

config :exquickbooks,
  callback_url: "http://example.com/callback",
  consumer_key: "key",
  consumer_secret: "secret",
  use_production_api: true

Accepted configuration keys

:callback_url

Required. An absolute URL where the user is redirected after authorising your application. See the documentation for ExQuickBooks.OAuth for more details.

:consumer_key, :consumer_secret

Required. OAuth consumer credentials which you can get for your application at https://developer.intuit.com/getstarted.

Please note that there are different credentials for the sandbox and production APIs.

:use_production_api

Optional, false by default. Set to false to use the QuickBooks Sandbox, true to connect to the production APIs.

Reading environment variables

If you store configuration in the system’s environment variables, you can have ExQuickBooks read them at runtime:

config :exquickbooks,
  consumer_key: {:system, "EXQUICKBOOKS_KEY"},
  consumer_secret: {:system, "EXQUICKBOOKS_SECRET"}

This syntax works for binary and boolean values. Booleans are parsed from "true" and "false", otherwise the binary is used as is.