org.mule.modules

mule-module-quick-books-windows

config

Namespacehttp://www.mulesoft.org/schema/mule/quickbooks-windows
Schema Locationhttp://www.mulesoft.org/schema/mule/quickbooks-windows/current/mule-quickbooks-windows.xsd  (View Schema)
Schema Version4.0
Minimum Mule Version3.2

Module Overview

QuickBooks software provides an interface that allows you to use forms such as checks, deposit slips and invoices, making the accounting process more comfortable for the average business owner or manager. By using the built-in functions that pertain to your business, you are able to perform your company accounting by simply recording your vendor activities, customer activities, banking transactions, payroll checks and taxes. QuickBooks handles the accounting portion of each transaction behind the scenes. Read more: QuickBooks Accounting Tutorial | eHow.com http://www.ehow.com/way_5462311_quickbooks-accounting-tutorial.html#ixzz1csaydwxl

Summary

Configuration
<quickbooks-windows:config>
Configure an instance of this module
Message Processors
<quickbooks-windows:auth-user>
Authorize an user using OAuth1.0a
<quickbooks-windows:blue-dot-menu>
Retrieves Blue Dot App Menu from Intuit.
<quickbooks-windows:create>
Creates.
<quickbooks-windows:delete>
Deletes an object.
<quickbooks-windows:disconnect>
Invalidates the OAuth access token in the request, thereby disconnecting the user from QuickBooks for this app.
<quickbooks-windows:find-objects>
Lazily retrieves Objects For details on how to generate a query see: Retrieve Especification
<quickbooks-windows:generate-a-new-request-id>
Generate a new GUID for the requestId
<quickbooks-windows:get-access-token>
Extract accessToken
<quickbooks-windows:get-company-metadata>
Returns company metadata information.
<quickbooks-windows:get-current-user>
Returns current user information such as first name, last name, and email address.
<quickbooks-windows:get-object>
Retrieve objects by ID.
<quickbooks-windows:open-id-initialize>
Initializes OpenID process
<quickbooks-windows:reconnect>
Generates a new OAuth access token and invalidates the OAuth access token used in the request, thereby extending the life span by six months.
<quickbooks-windows:revert>
Revert objects by ID.
<quickbooks-windows:status>
Retrieve the Status

Retrieves information about the sync status of Quickbooks entities.

<quickbooks-windows:sync-activity>
Retrieve the SyncActivities

The SyncActivity object contains information about Quickbooks for Windows synchronizations.

<quickbooks-windows:update>
Updates.
<quickbooks-windows:verify-open-id>
Verify response from Intuit

Configuration

To use the this module within a flow the namespace to the module must be included. The resulting flow will look similar to the following:

<mule xmlns="http://www.mulesoft.org/schema/mule/core"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:quickbooks-windows="http://www.mulesoft.org/schema/mule/quickbooks-windows"
      xsi:schemaLocation="
               http://www.mulesoft.org/schema/mule/core
               http://www.mulesoft.org/schema/mule/core/current/mule.xsd
               http://www.mulesoft.org/schema/mule/quickbooks-windows
               http://www.mulesoft.org/schema/mule/quickbooks-windows/current/mule-quickbooks-windows.xsd">

      <!-- here goes your flows and configuration elements -->

</mule>

This module is configured using the config element. This element must be placed outside of your flows and at the root of your Mule application. You can create as many configurations as you deem necessary as long as each carries its own name.

Each message processor, message source or transformer carries a config-ref attribute that allows the invoker to specify which configuration to use.

Attributes
TypeNameDefault ValueDescriptionJava TypeMIME TypeEncoding
xs:string name Optional. Give a name to this configuration so it can be later referenced.
xs:string accessTokenIdentifierPrefix Optional. Prefix used for storing credentials in ObjectStore.
xs:string baseUri https://services.intuit.com/sb Optional. The base uri of the quickbooks endpoint, used to fetch the company uri.
client Optional. Quick-Books client.
xs:string consumerKey API Key
xs:string consumerSecret API Secret
objectStore _defaultUserObjectStore Optional. Object store reference
xs:boolean verifyOpenIdResponse true Optional. Specifies if the OpenID response will be verified.

Message Processors

<quickbooks-windows:auth-user>

Authorize an user using OAuth1.0a

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
requestTokenUrl RequestTokenUrl String */* UTF-8
accessTokenUrl AccessTokenUrl String */* UTF-8
authorizationUrl AuthorizationUrl String */* UTF-8
callbackUrl CallbackUrl for OAuth service String */* UTF-8
requestTokenId Optional. Optional value for identifying the requestToken. If it is not passed the client will use a UUID String */* UTF-8
Child Elements
NameDefault ValueDescriptionJava Type
<quickbooks-windows:headers> Outbound headers Map<String, Object>
Returns
Return Type Description
String Authorize Url
Exception Payloads
Payload ClassDescription
ObjectStoreException from the Object Store instance
OAuthCommunicationException requesting to OAuth provider
OAuthExpectationFailedException requesting to OAuth provider
OAuthNotAuthorizedException requesting to OAuth provider
OAuthMessageSignerException requesting to OAuth provider

<quickbooks-windows:blue-dot-menu>

Retrieves Blue Dot App Menu from Intuit.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
accessTokenId Credentials identifier for the user information to be requested String */* UTF-8
Returns
Return Type Description
Object Object containing the HTML and javascript for displaying the menu

<quickbooks-windows:create>

Creates. For details of the supported objects and its fields: Supported Objects and Operations

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
accessTokenId Identifier for QuickBooks credentials. String */* UTF-8
type WindowsEntityType of the object. WindowsEntityType */*
entityObject #[payload] Optional. Represents the object to be created. Object */*
draft false Optional. Boolean draft

Saving an IDS object in a draft state prevents it from being synchronized with Quickbooks. Your app might want to save an object in a draft state if the user has not finished entering data, or for some other reason the user does not want to commit the object for synchronization. You may save an object in draft state during a create or update operation by specifying the draft="true" attribute. By default, the Draft attribute is false, which means that the saved object will be synchronized with Quickbooks.

Boolean */*
fullResponse false Optional. Boolean fullResponse. If this flag is true, it will return the created object, otherwise, it will return an ObjectRef. Boolean */*
Returns
Return Type Description
Object The created Object or an ObjectRef if the fullResponse flag was null of false.
Exception Payloads
Payload ClassDescription
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

<quickbooks-windows:delete>

Deletes an object.

Most objects cannot be deleted by calling Data Services.

If the obj map do not have the MetaData field or the SyncToken, internally, will retrieve the object at first, to delete it. So be careful, because it will need two request instead of one, which could make it slower.

For details of the supported objects and its fields: Supported Objects and Operations

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
accessTokenId Identifier for QuickBooks credentials. String */* UTF-8
type WindowsEntityType of the object. WindowsEntityType */*
entityObject #[payload] Optional. Represents the object to be deleted. Object */*
Exception Payloads
Payload ClassDescription
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

<quickbooks-windows:disconnect>

Invalidates the OAuth access token in the request, thereby disconnecting the user from QuickBooks for this app.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
accessTokenId Credentials identifier for the user information to be requested String */* UTF-8
Returns
Return Type Description
boolean true if the user was disconnect from QBW

<quickbooks-windows:find-objects>

Lazily retrieves Objects For details on how to generate a query see: Retrieve Especification

XML Sample
INCLUDE_ERROR
XML Sample
INCLUDE_ERROR
XML Sample
INCLUDE_ERROR
XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
accessTokenId Identifier for QuickBooks credentials. String */* UTF-8
type WindowsEntityType of the object. WindowsEntityType */*
Child Elements
NameDefault ValueDescriptionJava Type
<quickbooks-windows:query> Optional. Map that represents every filter and sort for the objects retrieved. Each type of object to be retrieved, has a TheObjectQuery class that has the attributes for which it can be filtered

(To know which attributes are accepted in every ObjectQuery, you could follow the link in the documentation of the WindowsEntityType that you require, or you can follow the link changing the word OBJECT for the object that you required, for example Account:

https://ipp.developer.intuit.com/0010_Intuit_Partner_Platform/0050_Data_Services/ 0500_QuickBooks_Windows/0600_Object_Reference/OBJECT

).

Do not complete the fields chunkSize and startPage, because are need it for the "lazily retrieve".

If query is null, it will retrieve all the objects of that WindowsEntityType.
Map<String, Object>
Returns
Return Type Description
Iterable Iterable of the objects to be retrieved.
Exception Payloads
Payload ClassDescription
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

<quickbooks-windows:generate-a-new-request-id>

Generate a new GUID for the requestId

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
Returns
Return Type Description
String a GUID for the requestId

<quickbooks-windows:get-access-token>

Extract accessToken

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
apiUrl Optional. API URL String */* UTF-8
verifier #[message.inboundProperties.oauth_verifier] Optional. OAuth verifier. It comes within the callback. The default value is "#[header:inbound:oauth_verifier]" String */* UTF-8
requestTokenId #[message.inboundProperties.userId] Optional. Id used for identifying the authorized request token. It comes within the callback. By default the query string parameter is userId String */* UTF-8
userIdentifier #[message.inboundProperties.realmId] Optional. Id used for store the accessToken in the Object Store. By default the value is the realmId String */* UTF-8
Returns
Return Type Description
OAuthCredentials credentials user credentials
Exception Payloads
Payload ClassDescription
ObjectStoreException from the object store instance
OAuthCommunicationException requesting to OAuth provider
OAuthExpectationFailedException requesting to OAuth provider
OAuthNotAuthorizedException requesting to OAuth provider
OAuthMessageSignerException requesting to OAuth provider

<quickbooks-windows:get-company-metadata>

Returns company metadata information.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
accessTokenId Identifier for QuickBooks credentials. String */* UTF-8
Returns
Return Type Description
Object company metadata

<quickbooks-windows:get-current-user>

Returns current user information such as first name, last name, and email address. For details see: CurrentUserAPI

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
accessTokenId Identifier for QuickBooks credentials. String */* UTF-8
Returns
Return Type Description
UserInformation current user information

<quickbooks-windows:get-object>

Retrieve objects by ID. For details of the supported objects: Supported Objects and Operations

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
accessTokenId Identifier for QuickBooks credentials. String */* UTF-8
type WindowsEntityType of the object. WindowsEntityType */*
idType #[payload] Optional. Id IdType which is assigned by Data Services when the object is created. Object */*
Returns
Return Type Description
Object The object.
Exception Payloads
Payload ClassDescription
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

<quickbooks-windows:open-id-initialize>

Initializes OpenID process

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
providerUrl https://openid.intuit.com/OpenId/Provider Optional. OpenID provider url String */* UTF-8
callbackUrl OpenID callbackUrl. It has to point to an endpoint callback to process the response String */* UTF-8
Child Elements
NameDefault ValueDescriptionJava Type
<quickbooks-windows:headers> OpenId response headers Map<String, Object>
Returns
Return Type Description
String url to redirect the user
Exception Payloads
Payload ClassDescription
ObjectStoreException if the operation cannot store the OpenIDManagers

<quickbooks-windows:reconnect>

Generates a new OAuth access token and invalidates the OAuth access token used in the request, thereby extending the life span by six months. Because accessing QuickBooks data requires a valid access token, when the OAuth access token is renewed, your app can continue to access the user's QuickBooks company data.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
accessTokenId Credentials identifier for the user information to be requested String */* UTF-8
Exception Payloads
Payload ClassDescription
ObjectStoreException if the credentials store failed

<quickbooks-windows:revert>

Revert objects by ID. For details of the supported objects: Supported Objects and Operations

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
accessTokenId Identifier for QuickBooks credentials. String */* UTF-8
type WindowsEntityType of the object. WindowsEntityType */*
entityObject #[payload] Optional. Represents the object to be reverted. Object */*
Exception Payloads
Payload ClassDescription
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

<quickbooks-windows:status>

Retrieve the Status

Retrieves information about the sync status of Quickbooks entities. You can also query specific entity types for either synchronized or unsynchronized objects with filters. You can get information on recent synchronizations using the syncActivity operation.

Note: Sync status information will be maintained for all operations in the cloud up to 30 days old. Of those operations older than 30 days, only the last operation's synch status will be maintained.

XML Sample
INCLUDE_ERROR
XML Sample
INCLUDE_ERROR
XML Sample
INCLUDE_ERROR
XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
accessTokenId Identifier for QuickBooks credentials. String */* UTF-8
syncStatusRequest #[payload] Optional. It has the specifications of the syncStatuses to be retrieved. (like a filter) SyncStatusRequest */*
Returns
Return Type Description
List<SyncStatusResponse> list of SyncStatusResponse

<quickbooks-windows:sync-activity>

Retrieve the SyncActivities

The SyncActivity object contains information about Quickbooks for Windows synchronizations. To get the sync status of another type of object, for example, a customer, use the status operation. To filter a query based on whether or not an object is synchronized, use a filter.

Note: Sync status information will be maintained for all operations in the cloud up to 30 days old. Of those operations older than 30 days, only the last operation's synch status will be maintained.

XML Sample
INCLUDE_ERROR
XML Sample
INCLUDE_ERROR
XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
accessTokenId Identifier for QuickBooks credentials. String */* UTF-8
Child Elements
NameDefault ValueDescriptionJava Type
<quickbooks-windows:sync-activity-request> Optional. Map that represents a SyncActivityRequest object. It has the specifications of the SyncActivities to be retrieved. (like a filter) Map<String, Object>
Returns
Return Type Description
List<SyncActivityResponse> list of SyncActivityResponse

<quickbooks-windows:update>

Updates.

Specify all the parameters for the object, not just the new or changed elements. If you omit an element, it is removed from the object by the update operation.

For details of the supported objects and its fields: Supported Objects and Operations

When updating transaction objects (such as Estimate or Invoice), note the following:

* To retain existing line items, specify them in the request XML body and do not change their order.

* To remove a line item, omit it.

* To add a new line item, insert a new one in the list.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
accessTokenId Identifier for QuickBooks credentials. String */* UTF-8
type WindowsEntityType of the object. WindowsEntityType */*
entityObject #[payload] Optional. Represents the object to be updated. Object */*
draft false Optional. Boolean draft

Saving an IDS object in a draft state prevents it from being synchronized with Quickbooks. Your app might want to save an object in a draft state if the user has not finished entering data, or for some other reason the user does not want to commit the object for synchronization. You may save an object in draft state during a create or update operation by specifying the draft="true" attribute. By default, the Draft attribute is false, which means that the saved object will be synchronized with Quickbooks.

Boolean */*
fullResponse false Optional. Boolean fullResponse. If this flag is true, it will return the created object, otherwise, it will return an ObjectRef. Boolean */*
Returns
Return Type Description
Object The updated Object or an ObjectRef if the fullResponse flag was null of false.
Exception Payloads
Payload ClassDescription
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

<quickbooks-windows:verify-open-id>

Verify response from Intuit

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
muleMessage Injected MuleMessage MuleMessage */*
receivingUrl Optional. Url from OpenID provider.

If it is not provided the processor will extract it from the Mule message

String */* UTF-8
Child Elements
NameDefault ValueDescriptionJava Type
<quickbooks-windows:response-parameters> #[header:INBOUND:http.query.params] Optional. Response parameters from Intuit. It process a map with all the OpenID attributes sent from Intuit. Map<String, String>
Returns
Return Type Description
OpenIDCredentials OpenID credentials for the authenticated user
Exception Payloads
Payload ClassDescription
MessageException from OpenID manager
ObjectStoreException if the operation cannot retrieve OpenID managers from ObjectStore

Message Sources

Transformers