QuickBooks Integrator 2022 Java Edition
Version 22.0 [Build 8594]

Address Class

Properties   Methods   Events   Config Settings   Errors  

An Address represents a geographical address.

Syntax

inqb.Address

Remarks

Address is a utility object which allows the user to easily edit and copy addresses. It is designed to interact with other classs, rather than QuickBooks.

To add an address to another class, such as a Customer, first instantiate an Address class, and set any or all of the properties: Line1, Line2, Line3, Line4, Line5, City, State, PostalCode, and Country. Then, the Aggregate property may be used to construct an aggregate of the entire address. This aggregate should be passed to the other class.

Example Address1.Line1 = "100 Main Street" Address1.City = "Anytown" Address1.State = "CA" Customer1.BillingAddress = Address1.Aggregate The same process may be used in reverse to get an address from another class. For example, this pseudocode will get the address of a Vendor:

Vendor.Get("ACME Inc.") Address.Aggregate = Vendor.Address

Property List


The following is the full list of the properties of the class with short descriptions. Click on the links for further details.

AggregateThe entire address.
CityThe city.
CountryThe country.
Line1The first line of the address.
Line2The second line of the address.
Line3The third line of the address.
Line4The fourth line of the address.
Line5The fifth line of the address.
NoteNote line of the address aggregate.
PostalCodeThe postal code.
StateThe state.

Method List


The following is the full list of the methods of the class with short descriptions. Click on the links for further details.

ConfigSets or retrieves a configuration setting.

Event List


The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.

ErrorInformation about errors during data delivery.

Config Settings


The following is a list of config settings for the class with short descriptions. Click on the links for further details.

AuthFlagsConnection Flags (use for QuickBooks Simple Start).
EnforceMaxLengthIndicates whether to enforce max lengths for QB Fields.
GetHighestVersionHighest QBXMLVersion supported by the installed instance of QuickBooks.
GetRequestProcessorDLLVersionReturns the version of the QB Request Processor that is installed on your system.
GetSupportedVersionsReturns a list of QBXMLVersions that are supported by QuickBooks.
IsReadOnlyThis causes the QuickBooks authorization dialog to display text informing the user that its access will be read-only.
NameThe name associated with the address.
PersonalDataPrefWhether the connecting application will require access to personal data such as SSN or credit card information.
QBConnectionModeThe mode of connection to QuickBooks.
QBFileStatusThe status of the company file as it pertains to accepting connections.
QBOpenCompanyFileThe file currently open in QuickBooks.
SSLAcceptServerCertThe SSL certificate being used by the QuickBooks Gateway (aka Remote Connector).
SSLAcceptServerCertFileThe SSL certificate file being used by the QuickBooks Gateway (aka Remote Connector).
StopOnErrorSpecifies how QuickBooks is to proceed if an error occurs in processing of the current request.
UnattendedModePrefWhether connecting while QuickBooks is closed is required or optional for the user.
WarningCodesA comma-separated list of QuickBooks warning codes that should not result in an exception.
BuildInfoInformation about the product's build.
GUIAvailableTells the class whether or not a message loop is available for processing events.
LicenseInfoInformation about the current license.
MaskSensitiveWhether sensitive data is masked in log messages.
UseDaemonThreadsWhether threads created by the class are daemon threads.
UseInternalSecurityAPITells the class whether or not to use the system security libraries or an internal implementation.

Aggregate Property (Address Class)

The entire address.

Syntax


public String getAggregate();


public void setAggregate(String aggregate);

Default Value

""

Remarks

An aggregate consisting of the entire address, formatted as XML without end tags. Address properties of the various classs accept and return data in this format exclusively.

When this property is read, an aggregate is formed from the value of all the other properties. When the property is written, the input is parsed and the various properties are set. Reading or writing the value of this property will also escape or unescape special characters such as '&', as appropriate.

There is generally no need to generate or inspect the value of Aggregate by hand. This property allows the user to easily pass data between instances of an Address class, or between an Address class and a QuickBooks object class.

It is, however, possible, to generate the value by hand, and use this value directly in other classs as an alternative to using the Address class. The formatting is as in QBXML; any or all fields may be left out:

<Addr1>Line1</Addr1><Addr2>Line2</Addr2><Addr3>Line3</Addr3> <City>City</City><State>State</State><PostalCode>PostalCode</PostalCode> <Country>Country</Country>

City Property (Address Class)

The city.

Syntax


public String getCity();


public void setCity(String city);

Default Value

""

Remarks

The city in the address.

Country Property (Address Class)

The country.

Syntax


public String getCountry();


public void setCountry(String country);

Default Value

""

Remarks

The country. If not specified, assumed to be the United States.

Line1 Property (Address Class)

The first line of the address.

Syntax


public String getLine1();


public void setLine1(String line1);

Default Value

""

Remarks

The first line of the address.

Line2 Property (Address Class)

The second line of the address.

Syntax


public String getLine2();


public void setLine2(String line2);

Default Value

""

Remarks

The second line of the address.

Line3 Property (Address Class)

The third line of the address.

Syntax


public String getLine3();


public void setLine3(String line3);

Default Value

""

Remarks

The third line of the address.

Line4 Property (Address Class)

The fourth line of the address.

Syntax


public String getLine4();


public void setLine4(String line4);

Default Value

""

Remarks

The fourth line of the address. Requires QuickBooks 2003. Used when parsing block addresses.

Line5 Property (Address Class)

The fifth line of the address.

Syntax


public String getLine5();


public void setLine5(String line5);

Default Value

""

Remarks

The fifth line of the address. This line is only applicable when QBXMLVersion is "6.0" or greater in the class using the address aggregate.

Note Property (Address Class)

Note line of the address aggregate.

Syntax


public String getNote();


public void setNote(String note);

Default Value

""

Remarks

Not all classs support this Note line in the address aggregate. For those that do, QBXMLVersion must be "6.0" or greater to use this property.

PostalCode Property (Address Class)

The postal code.

Syntax


public String getPostalCode();


public void setPostalCode(String postalCode);

Default Value

""

Remarks

The postal or zip code.

State Property (Address Class)

The state.

Syntax


public String getState();


public void setState(String state);

Default Value

""

Remarks

The state in the address.

In the Employee class State must be a valid two-letter abbreviation for a U.S. state.

For Canadian editions of QuickBooks, State represents the province instead.

Config Method (Address Class)

Sets or retrieves a configuration setting.

Syntax

public String config(String configurationString);

Remarks

Config is a generic method available in every class. It is used to set and retrieve configuration settings for the class.

These settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the class, access to these internal properties is provided through the Config method.

To set a configuration setting named PROPERTY, you must call Config("PROPERTY=VALUE"), where VALUE is the value of the setting expressed as a string. For boolean values, use the strings "True", "False", "0", "1", "Yes", or "No" (case does not matter).

To read (query) the value of a configuration setting, you must call Config("PROPERTY"). The value will be returned as a string.

Error Event (Address Class)

Information about errors during data delivery.

Syntax

public class DefaultAddressEventListener implements AddressEventListener {
  ...
  public void error(AddressErrorEvent e) {}
  ...
}

public class AddressErrorEvent {
  public int errorCode;
  public String description;
}

Remarks

The Error event is fired in case of exceptional conditions during message processing.

ErrorCode contains an error code and Description contains a textual description of the error. For a list of valid error codes and their descriptions, please refer to the Error Codes section.

Config Settings (Address Class)

The class accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the class, access to these internal properties is provided through the Config method.

Address Config Settings

AuthFlags:   Connection Flags (use for QuickBooks Simple Start).

Since 2006, QuickBooks has allowed AuthFlags to be set before connecting to QuickBooks. By default, the class can connect to Pro, Premier, and Enterprise editions of QuickBooks. However, because QuickBooks Simple Start contains only a subset of the functionality that other desktop versions provide, Intuit does not allow COM connection to Simple Start unless these AuthFlags explicitly indicate you wish to support it.

A list of allowable AuthFlags is provided below.

"" or 0Do not send any auth flags
0x01Support QB Simple Start
0x02Support QB Pro
0x04Support QB Premier
0x08Support QB Enterprise
0x80000000Force Auth Dialog

To specify support for multiple editions, OR together the values for each edition.

NOTE: If the version of QuickBooks being used does not support AuthFlags, the contents of this config will be ignored. However, if QuickBooks does support this feature, setting "AuthFlags=1" (Support for Simple Start only) on a machine running QuickBooks 2013 Pro will result in an error message indicating that the Request Processor cannot be found.

EnforceMaxLength:   Indicates whether to enforce max lengths for QB Fields.

If you change this setting to False, the class will no longer check (or error) when the length of a property exceeds the maximum length specified in the QuickBooks SDK.

GetHighestVersion:   Highest QBXMLVersion supported by the installed instance of QuickBooks.

If QuickBooks is installed on the system, this setting will retrieve the highest QBXMLVersion that may be used for sending transactions to QuickBooks.

GetRequestProcessorDLLVersion:   Returns the version of the QB Request Processor that is installed on your system.

GetSupportedVersions:   Returns a list of QBXMLVersions that are supported by QuickBooks.

If QuickBooks is installed on the system, this setting will retrieve a list of all supported QBXMLVersions that may be used for sending transactions to QuickBooks. While GetHighestVersion config returns only the highest QBXMLVersion supported, this config returns ALL supported QBXMLVersions. The list is delimited with '\n' (linefeed) characters.

IsReadOnly:   This causes the QuickBooks authorization dialog to display text informing the user that its access will be read-only.

The default value is false.

Name:   The name associated with the address.

Use this config to include a Name in the address aggregate. Required for ShipTo addresses.

PersonalDataPref:   Whether the connecting application will require access to personal data such as SSN or credit card information.

This setting allows you to let the user know immediately whether your application requires access to personal data or not.

A list of available values is provided below.

pdpOptionalCauses the QuickBooks authorization dialog to display a checkbox for user selection asking whether the user wants to allow the application to access personal data.
pdpRequiredCauses the QuickBooks authorization dialog to not display the personal information checkbox for user selection, and instead display a warning that the application needs to access personal data.
pdpNotNeededCauses the QuickBooks authorization dialog to not display the personal information checkbox for user selection, and instead display an informational message that the application will NOT access personal data.

The default value is pdpOptional.

QBConnectionMode:   The mode of connection to QuickBooks.

Specifies whether the integrated application logs in using single-user or multi-user mode.

The following values are permitted:

0Don't Care
1Single-User Mode
2Multi-User Mode

About Single-User and Multi-User Modes

If the connection to QuickBooks is made in single-user mode, QuickBooks will give exclusive access to the connecting application. It will lock out all other integrated applications; if QuickBooks and the company file are not already open in single-user mode by the QuickBooks user, the user will be locked out as well.

If the connection is made in multi-user mode, QuickBooks will allow all other integrated applications access. QuickBooks end users on other machines will also be allowed to access the file. However, if the application (rather than the end user) starts QuickBooks automatically, end users on the same machine will still be locked out.

If cmDontCare is specified, an appropriate connection mode will be chosen automatically. If a company file is open in either single-user or multi-user mode, the integrated application will accept that connection mode. If no company file is open, QuickBooks will login automatically in multi-user mode.

About Integrated and Automatic Login

Note that your application's login to QuickBooks might be either automatic or interactive. Interactive login is used when QuickBooks is already open. Access will be shared between the integrated application and the QuickBooks end user, and if multi-user mode is specified, other applications and users will have access as well. When a connection is made, QuickBooks will show a dialog window to the user, and ask the user if he/she wants to permit the connection.

Automatic login is used when QuickBooks is not already open. QuickBooks will be opened in the background, and will run until your application has finished its connection with QuickBooks. The QuickBooks user interface will not be displayed, and end-users on the same machine will be locked out. End-users on other machines, however, will be allowed access if multi-user mode is specified.

By default integrated applications do not have permission to login automatically. The first time an application interacts with QuickBooks, it must do so interactively, with QuickBooks and the company file open. The QuickBooks end user may then grant automatic login permission through Edit Preferences - Integrated Applications in the QuickBooks user interface. Click on the name of the application and then "Properties", and you may allow the application to login automatically.

For automatic login the CompanyFile must be specified. CompanyFile, ApplicationName, and other properties relating to the QuickBooks connection may be edited through QBConnectionString.

QBFileStatus:   The status of the company file as it pertains to accepting connections.

This setting may be queried before attempting to connect to QuickBooks to determine the current company file status. When queried the class will attempt to determine whether a subsequent connection using the provided QBConnectionString value would succeed. Possible return values are:

0 The company file will accept the connection. This indicates that no company file is open, or the desired company file is already open.
1 The company file will not accept the connection. This indicates a different company file is already open.

QBOpenCompanyFile:   The file currently open in QuickBooks.

The name of the file currently open in QuickBooks, specified completely with the path. This field is read-only.

A query is submitted to QuickBooks when the value of this property is read. The empty string will be returned if no file is open, if QuickBooks is open in an access mode incompatible with QBConnectionMode, or if an error occurs.

If the value of this property is nonempty, the class may interact exclusively with the open file.

SSLAcceptServerCert:   The SSL certificate being used by the QuickBooks Gateway (aka Remote Connector).

The Base-64 encoded certificate being used by the Remote Connector (you may get this certificate from the Remote Connector by going to the Security tab, and clicking Export.)

This is only necessary if using a self-signed certificate, or any other certificate that has not been signed by a Certificate Authority (CA) trusted by the system.

SSLAcceptServerCertFile:   The SSL certificate file being used by the QuickBooks Gateway (aka Remote Connector).

If your public key certificate is stored in a file, you may set this configuration setting to the full path of the certificate, and it will be immediately read from disk and stored in SSLAcceptServerCert. Equivalent to setting SSLAcceptServerCert to file contents.

Reading the value of this setting will return an empty string.

StopOnError:   Specifies how QuickBooks is to proceed if an error occurs in processing of the current request.

If StopOnError is True (default), QuickBooks will stop processing when an error occurs. Requests that have already been processed will not be rolled back. An error is returned for the operation that caused the error condition. If StopOnError is False, QuickBooks will continue processing the remaining requests if an error occurs.

UnattendedModePref:   Whether connecting while QuickBooks is closed is required or optional for the user.

This setting allows you to let the user know immediately whether your application requires the ability to access QuickBooks while QuickBooks is closed.

A list of available values is provided below.

umpOptionalCauses the QuickBooks authorization dialog to display its default selections and let the user pick. Use this setting if you do not need unattended mode.
umpRequiredCauses the QuickBooks authorization dialog to display only the selection choices of "No" (no authorization) or "Yes, allow access even if QuickBooks is not running" (authorize unattended mode).

The default value is umpOptional.

WarningCodes:   A comma-separated list of QuickBooks warning codes that should not result in an exception.

By default, the class will throw an exception when a status code with severity "Warn" is returned in a QuickBooks response. Set this field to a comma-separated list of status codes that should not throw an exception if returned. Note that the QuickBooks response code is not necessarily the same as the exception code from the resulting exception.

Base Config Settings

BuildInfo:   Information about the product's build.

When queried, this setting will return a string containing information about the product's build.

GUIAvailable:   Tells the class whether or not a message loop is available for processing events.

In a GUI-based application, long-running blocking operations may cause the application to stop responding to input until the operation returns. The class will attempt to discover whether or not the application has a message loop and, if one is discovered, it will process events in that message loop during any such blocking operation.

In some non-GUI applications, an invalid message loop may be discovered that will result in errant behavior. In these cases, setting GUIAvailable to false will ensure that the class does not attempt to process external events.

LicenseInfo:   Information about the current license.

When queried, this setting will return a string containing information about the license this instance of a class is using. It will return the following information:

  • Product: The product the license is for.
  • Product Key: The key the license was generated from.
  • License Source: Where the license was found (e.g., RuntimeLicense, License File).
  • License Type: The type of license installed (e.g., Royalty Free, Single Server).
  • Last Valid Build: The last valid build number for which the license will work.
MaskSensitive:   Whether sensitive data is masked in log messages.

In certain circumstances it may be beneficial to mask sensitive data, like passwords, in log messages. Set this to true to mask sensitive data. The default is true.

This setting only works on these classes: AS3Receiver, AS3Sender, Atom, Client(3DS), FTP, FTPServer, IMAP, OFTPClient, SSHClient, SCP, Server(3DS), Sexec, SFTP, SFTPServer, SSHServer, TCPClient, TCPServer.

UseDaemonThreads:   Whether threads created by the class are daemon threads.

If set to True (default), when the class creates a thread, the thread's Daemon property will be explicitly set to True. When set to False, the class will not set the Daemon property on the created thread. The default value is True.

UseInternalSecurityAPI:   Tells the class whether or not to use the system security libraries or an internal implementation.

When set to false, the class will use the system security libraries by default to perform cryptographic functions where applicable.

Setting this setting to true tells the class to use the internal implementation instead of using the system security libraries.

This setting is set to false by default on all platforms.

Trappable Errors (Address Class)

Errors

Address Errors

812   The address is invalid.

Copyright (c) 2023 4D Payments Inc.
QuickBooks Integrator 2022 Java Edition - Version 22.0 [Build 8594]