public class

QuickBooksWindowsModule

extends Object
java.lang.Object
   ↳ org.mule.modules.quickbooks.windows.QuickBooksWindowsModule
Known Direct Subclasses
Known Indirect Subclasses

Class 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

Fields
private String baseUri The base uri of the quickbooks endpoint, used to fetch the company uri.
private QuickBooksWindowsClient client Quick-Books client.
private final MapObjectMapper mom
Public Constructors
QuickBooksWindowsModule()
Public Methods
Object create(String realmId, String appKey, String realmIdPseudonym, String authIdPseudonym, WindowsEntityType type, Map<String, Object> obj, String requestId, Boolean draft, Boolean fullResponse)
Creates.
void delete(String realmId, String appKey, String realmIdPseudonym, String authIdPseudonym, WindowsEntityType type, Map<String, Object> obj, String requestId)
Deletes an object.
Iterable findObjects(String realmId, String appKey, String realmIdPseudonym, String authIdPseudonym, WindowsEntityType type, Map<String, Object> query)
Lazily retrieves Objects For details on how to generate a query see: Retrieve Especification
String generateANewRequestId()
Generate a new GUID for the requestId
String getBaseUri()
Object getObject(String realmId, String appKey, String realmIdPseudonym, String authIdPseudonym, WindowsEntityType type, Map<String, Object> id)
Retrieve objects by ID.
void init()
post construct
void setBaseUri(String baseUri)
List<SyncStatusResponse> status(String realmId, String appKey, String realmIdPseudonym, String authIdPseudonym, Map<String, Object> syncStatusRequest)
Retrieve the Status

Retrieves information about the sync status of Quickbooks entities.

List<SyncActivityResponse> syncActivity(String realmId, String appKey, String realmIdPseudonym, String authIdPseudonym, Map<String, Object> syncActivityRequest)
Retrieve the SyncActivities

The SyncActivity object contains information about Quickbooks for Windows synchronizations.

Object update(String realmId, String appKey, String realmIdPseudonym, String authIdPseudonym, WindowsEntityType type, Map<String, Object> obj, String requestId, Boolean draft, Boolean fullResponse)
Updates.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

private String baseUri

The base uri of the quickbooks endpoint, used to fetch the company uri. Quickbooks connector will first use this uri and the realmId to get a second uri, called company uri, which is the actual quickbooks endpoint for the connector

private QuickBooksWindowsClient client

Quick-Books client. By default uses DefaultQuickBooksWindowsClient class.

private final MapObjectMapper mom

Public Constructors

public QuickBooksWindowsModule ()

Public Methods

public Object create (String realmId, String appKey, String realmIdPseudonym, String authIdPseudonym, WindowsEntityType type, Map<String, Object> obj, String requestId, Boolean draft, Boolean fullResponse)

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

Parameters
realmId The realmID, also known as the Company ID, uniquely identifies the data for a company. In QuickBooks, the Company ID appears on the My Account page. In Data Services for QuickBooks, the realmID is required in the URL for most calls.
appKey Application Id.
realmIdPseudonym Pseudonym Realm Id, obtained from the gateway that represents the company.
authIdPseudonym Pseudonym Auth Id, obtained from the gateway that represents the user.
type WindowsEntityType of the object.
obj Map that represents the object to be created.
requestId The unique request Id
draft 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.

fullResponse Boolean fullResponse. If this flag is true, it will return the created object, otherwise, it will return an ObjectRef.
Returns
  • The created Object or an ObjectRef if the fullResponse flag was null of false.
Throws
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

public void delete (String realmId, String appKey, String realmIdPseudonym, String authIdPseudonym, WindowsEntityType type, Map<String, Object> obj, String requestId)

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

Parameters
realmId The realmID, also known as the Company ID, uniquely identifies the data for a company. In QuickBooks Online, the Company ID appears on the My Account page. In Data Services for QuickBooks Online, the realmID is required in the URL for most calls.
appKey Application Id.
realmIdPseudonym Pseudonym Realm Id, obtained from the gateway that represents the company.
authIdPseudonym Pseudonym Auth Id, obtained from the gateway that represents the user.
type WindowsEntityType of the object.
obj Map that represents the object to be created.
requestId The unique request Id
Throws
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

public Iterable findObjects (String realmId, String appKey, String realmIdPseudonym, String authIdPseudonym, WindowsEntityType type, Map<String, Object> query)

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

Parameters
realmId The realmID, also known as the Company ID, uniquely identifies the data for a company. In QuickBooks Online, the Company ID appears on the My Account page. In Data Services for QuickBooks Online, the realmID is required in the URL for most calls.
appKey Application Id.
realmIdPseudonym Pseudonym Realm Id, obtained from the gateway that represents the company.
authIdPseudonym Pseudonym Auth Id, obtained from the gateway that represents the user.
type WindowsEntityType of the object.
query 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.
Returns
  • Iterable of the objects to be retrieved.
Throws
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

public String generateANewRequestId ()

Generate a new GUID for the requestId

Returns
  • a GUID for the requestId

public String getBaseUri ()

public Object getObject (String realmId, String appKey, String realmIdPseudonym, String authIdPseudonym, WindowsEntityType type, Map<String, Object> id)

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

Parameters
realmId The realmID, also known as the Company ID, uniquely identifies the data for a company. In QuickBooks, the Company ID appears on the My Account page. In Data Services for QuickBooks, the realmID is required in the URL for most calls.
appKey Application Id.
realmIdPseudonym Pseudonym Realm Id, obtained from the gateway that represents the company.
authIdPseudonym Pseudonym Auth Id, obtained from the gateway that represents the user.
type WindowsEntityType of the object.
id Id which is assigned by Data Services when the object is created.
Returns
  • The object.
Throws
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

public void init ()

post construct

public void setBaseUri (String baseUri)

Parameters
baseUri

public List<SyncStatusResponse> status (String realmId, String appKey, String realmIdPseudonym, String authIdPseudonym, Map<String, Object> syncStatusRequest)

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.

Parameters
realmId The realmID, also known as the Company ID, uniquely identifies the data for a company. In QuickBooks Online, the Company ID appears on the My Account page. In Data Services for QuickBooks Online, the realmID is required in the URL for most calls.
appKey Application Id.
realmIdPseudonym Pseudonym Realm Id, obtained from the gateway that represents the company.
authIdPseudonym Pseudonym Auth Id, obtained from the gateway that represents the user.
syncStatusRequest Map that represents a SyncStatusRequest object. It has the specifications of the syncStatuses to be retrieved. (like a filter)
Returns
  • list of SyncStatusResponse

public List<SyncActivityResponse> syncActivity (String realmId, String appKey, String realmIdPseudonym, String authIdPseudonym, Map<String, Object> syncActivityRequest)

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.

Parameters
realmId The realmID, also known as the Company ID, uniquely identifies the data for a company. In QuickBooks Online, the Company ID appears on the My Account page. In Data Services for QuickBooks Online, the realmID is required in the URL for most calls.
appKey Application Id.
realmIdPseudonym Pseudonym Realm Id, obtained from the gateway that represents the company.
authIdPseudonym Pseudonym Auth Id, obtained from the gateway that represents the user.
syncActivityRequest Map that represents a SyncActivityRequest object. It has the specifications of the SyncActivities to be retrieved. (like a filter)
Returns
  • list of SyncActivityResponse

public Object update (String realmId, String appKey, String realmIdPseudonym, String authIdPseudonym, WindowsEntityType type, Map<String, Object> obj, String requestId, Boolean draft, Boolean fullResponse)

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.

Parameters
realmId The realmID, also known as the Company ID, uniquely identifies the data for a company. In QuickBooks Online, the Company ID appears on the My Account page. In Data Services for QuickBooks Online, the realmID is required in the URL for most calls.
appKey Application Id.
realmIdPseudonym Pseudonym Realm Id, obtained from the gateway that represents the company.
authIdPseudonym Pseudonym Auth Id, obtained from the gateway that represents the user.
type WindowsEntityType of the object.
obj Map that represents the object to be created.
requestId The unique request Id
draft 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.

fullResponse Boolean fullResponse. If this flag is true, it will return the created object, otherwise, it will return an ObjectRef.
Returns
  • The updated Object or an ObjectRef if the fullResponse flag was null of false.
Throws
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.