ExQuickBooks.Client (ex_quickbooks v0.9.0)

Copy Markdown View Source

Validated client configuration shared across ExQuickBooks modules.

Summary

Functions

Returns the supported QuickBooks environments.

Validates client options and returns a configured client struct.

Returns the NimbleOptions schema for client validation.

Types

environment()

@type environment() :: :sandbox | :production

t()

@type t() :: %ExQuickBooks.Client{
  access_token: String.t() | nil,
  client_id: String.t(),
  client_secret: String.t(),
  environment: environment(),
  minor_version: pos_integer() | nil,
  realm_id: String.t(),
  redirect_uri: String.t(),
  refresh_token: String.t() | nil
}

Functions

environments()

@spec environments() :: [environment()]

Returns the supported QuickBooks environments.

new(options)

@spec new(keyword()) :: {:ok, t()} | {:error, ExQuickBooks.Error.t()}

Validates client options and returns a configured client struct.

schema()

@spec schema() :: keyword()

Returns the NimbleOptions schema for client validation.