docs

Home Templates Classes

QBSessionManager

This class handles runtime session management with QuickBooks, including session tracking, XML communication, and status reporting.

It is globally instantiated by the template and works alongside QBConnectionManager to manage low level interactions.


Purpose

Manages session state, sends XML requests, stores the response and status information, and provides high level methods for executing QuickBooks transactions.


Properties

Property Type Summary
QBConnectionManagerObject &QBConnectionManager Reference to the global connection manager.
DebugObject &QBDebugLogger Shared debug logger used across the wrapper.
SessionTicket CSTRING Holds the current session ticket string.
InSession BYTE TRUE when a session is active.
IsConnected BYTE TRUE when a connection to QuickBooks is open.
XMLRequest &CSTRING Reference to the current request XML string.
XMLResponse &CSTRING Reference to the last response XML string.
ResponseStatusCode LONG Status code returned by QuickBooks.
ResponseStatusMessage CSTRING(256) Text message describing the result.
ResponseStatusSeverity CSTRING(32) Status severity, for example Info, Warn, or Error.
ResponseRetCount LONG Number of records returned in the response.
DataBlockStart LONG Character offset to the beginning of the parsed block.
DataBlockEnd LONG Character offset to the end of the parsed block.

Key Methods

Method Prototype (summary) Description
Construct Construct() Class constructor. Initializes fields and references.
Destruct Destruct() Class destructor. Clears references and state.
BeginSession BeginSession([EnableDebug]) Starts a session with the current company file.
EndSession EndSession([EnableDebug]) Ends the current session with QuickBooks.
ProcessRequest ProcessRequest() Sends the current request to QuickBooks and stores the response, status, and counts.

All methods that accept EnableDebug toggle additional logging through the shared QBDebugLogger.


Notes and Behavior



Home Templates Classes