File: util.nu 1 exported command 7 internal commands

build-session

Internal

Build the session record stored in $env.QUICKBOOKS.

Usage

build-session <access_token> <realm_id> --minorversion <int> --client-id <string> --client-secret <string> --refresh-token <string> [--sandbox]

Parameters

access_token <string>
realm_id <string>

Flags

--minorversion <int>
QBO minor version (default: 75)
--client-id <string>
OAuth2 client ID (for refresh)
--client-secret <string>
OAuth2 client secret (for refresh)
--refresh-token <string>
OAuth2 refresh token
--sandbox
Use sandbox API

Input/output types

inputoutput
anyany

build-headers

Internal

Build standard QBO REST API headers.

Usage

build-headers <access_token>

Parameters

access_token <string>

Input/output types

inputoutput
anyany

refresh-access-token

Internal

Refresh the OAuth2 access token using the refresh token. Returns a record with the new access_token and refresh_token.

Usage

refresh-access-token

Input/output types

inputoutput
anyany

qb-call

Internal

Central HTTP helper for making QuickBooks API calls. Automatically injects minorversion query parameter. Returns the parsed response body.

Usage

qb-call <method> <url> --data <any> --params <record> --content-type <string>

Parameters

method <string>
url <string>

Flags

--data <any>
Body for POST requests
--params <record>
Additional query parameters
--content-type <string>
Override content type

Input/output types

inputoutput
anyany

qb-error

Internal

Raise a structured QuickBooks error based on status code and QBO error codes.

Usage

qb-error <status> <url> <content>

Parameters

status <int>
url <string>
content <any>

Input/output types

inputoutput
anyany

validate-entity

Internal

Validate that an entity name is a known QBO business object.

Usage

validate-entity <entity>

Parameters

entity <string>

Input/output types

inputoutput
anyany

load-env-file

Loads environment variables from a file.

Usage

load-env-file <path?>

Parameters

path <path>
(optional, default: '.env')

Input/output types

inputoutput
anyany

from kv

Internal

Parses `KEY=value` text into a record.

Usage

from kv

Input/output types

inputoutput
oneof<string, nothing>record