public class

QuickBooksModule

extends Object
java.lang.Object
   ↳ org.mule.modules.quickbooks.online.QuickBooksModule
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 accessTokenIdentifierPrefix Prefix used for storing credentials in ObjectStore.
private String baseUri The base uri of the quickbooks endpoint, used to fetch the company uri.
private QuickBooksOnlineClient client Quick-Books client.
private String consumerKey API Key
private String consumerSecret API Secret
private ObjectStore objectStore Object store reference
private ObjectStoreHelper objectStoreHelper Object store helper
private boolean verifyOpenIdResponse Specifies if the OpenID response will be verified.
Public Constructors
QuickBooksModule()
Public Methods
String authUser(String requestTokenUrl, String accessTokenUrl, String authorizationUrl, String callbackUrl, String requestTokenId, Map<String, Object> headers)
Authorize an user using OAuth1.0a
Iterable changeDataDeleted(String accessTokenId, String queryFilter, String querySort)
Gets all of the transactions and objects that have been deleted on the Data Services server For details see: ChangeDataDeleted
Account createAccount(String accessTokenId, Account account)
Creates an Account.
Bill createBill(String accessTokenId, Bill bill)
Creates a Bill.
BillPayment createBillPayment(String accessTokenId, BillPayment billPayment)
Creates a BillPayment.
CashPurchase createCashPurchase(String accessTokenId, CashPurchase cashPurchase)
Creates a CashPurchase.
Check createCheck(String accessTokenId, Check check)
Creates a Check.
CreditCardCharge createCreditCardCharge(String accessTokenId, CreditCardCharge creditCardCharge)
Creates a CreditCardCharge.
Customer createCustomer(String accessTokenId, Customer customer)
Creates a Customer.
Estimate createEstimate(String accessTokenId, Estimate estimate)
Creates an Estimate.
Invoice createInvoice(String accessTokenId, Invoice invoice)
Creates an Invoice.
Item createItem(String accessTokenId, Item item)
Creates an Item.
Payment createPayment(String accessTokenId, Payment payment)
Creates a Payment.
PaymentMethod createPaymentMethod(String accessTokenId, PaymentMethod paymentMethod)
Creates a PaymentMethod.
SalesReceipt createSalesReceipt(String accessTokenId, SalesReceipt salesReceipt)
Creates a SalesReceipt.
SalesTerm createSalesTerm(String accessTokenId, SalesTerm salesTerm)
Creates a SalesTerm.
Vendor createVendor(String accessTokenId, Vendor vendor)
Creates a Vendor.
void deleteObject(String accessTokenId, OnlineEntityType type, IdType id, String syncToken)
Deletes an object.
boolean disconnect(String accessTokenId)
Invalidates the OAuth access token in the request, thereby disconnecting the user from QuickBooks for this app.
Iterable findObjects(String accessTokenId, OnlineEntityType type, String queryFilter, String querySort)
Lazily retrieves Objects For details see: Vendor Specification
OAuthCredentials getAccessToken(String apiUrl, String verifier, String requestTokenId, String userIdentifier)
Extract accessToken
String getAccessTokenIdentifierPrefix()
String getBaseUri()
List<AppMenuInformation> getBlueDotInformation(String accessTokenId, String regex)
Gets blueDot menu information from Intuit
QuickBooksOnlineClient getClient()
Object getCompanyMetadata(String accessTokenId)
Returns company metadata information.
String getConsumerKey()
String getConsumerSecret()
UserInformation getCurrentUser(String accessTokenId)
Returns current user information such as first name, last name, and email address.
Object getObject(String accessTokenId, OnlineEntityType type, IdType id)
Retrieve objects by ID.
ObjectStore getObjectStore()
ObjectStoreHelper getObjectStoreHelper()
boolean getVerifyOpenIdResponse()
void init()
Generates the QuickbooksOnlineClient
String openIdInitialize(String providerUrl, String callbackUrl, Map<String, Object> headers)
Initializes OpenID process
void reconnect(String accessTokenId)
Generates a new OAuth access token and invalidates the OAuth access token used in the request, thereby extending the life span by six months.
void setAccessTokenIdentifierPrefix(String accessTokenIdentifierPrefix)
void setBaseUri(String baseUri)
void setClient(QuickBooksOnlineClient client)
void setConsumerKey(String consumerKey)
void setConsumerSecret(String consumerSecret)
void setObjectStore(ObjectStore objectStore)
void setObjectStoreHelper(ObjectStoreHelper objectStoreHelper)
void setVerifyOpenIdResponse(boolean verifyOpenIdResponse)
Account updateAccount(String accessTokenId, Account account)
Updates an Account The Account object represents the accounts that you keep to track your business.
Bill updateBill(String accessTokenId, Bill bill)
Updates a Bill The Bill object represents an expense to the business.
BillPayment updateBillPayment(String accessTokenId, BillPayment billPayment)
Updates a BillPayment BillPayment represents the financial transaction of payment of bills that the business owner receives from a vendor for goods or services purchased from the vendor.
CashPurchase updateCashPurchase(String accessTokenId, CashPurchase cashPurchase)
Updates a CashPurchase.
Check updateCheck(String accessTokenId, Check check)
Updates a Check.
CreditCardCharge updateCreditCardCharge(String accessTokenId, CreditCardCharge creditCardCharge)
Updates a CreditCardCharge.
Customer updateCustomer(String accessTokenId, Customer customer)
Updates a Customer.
Estimate updateEstimate(String accessTokenId, Estimate estimate)
Updates an Estimate.
Invoice updateInvoice(String accessTokenId, Invoice invoice)
Updates an Invoice.
Item updateItem(String accessTokenId, Item item)
Updates an Item.
Payment updatePayment(String accessTokenId, Payment payment)
Updates a Payment.
PaymentMethod updatePaymentMethod(String accessTokenId, PaymentMethod paymentMethod)
Updates a PaymentMethod.
SalesReceipt updateSalesReceipt(String accessTokenId, SalesReceipt salesReceipt)
Updates a SalesReceipt.
SalesTerm updateSalesTerm(String accessTokenId, SalesTerm salesTerm)
Updates a SalesTerm.
Vendor updateVendor(String accessTokenId, Vendor vendor)
Updates a Vendor.
OpenIDCredentials verifyOpenId(MuleMessage muleMessage, String receivingUrl, Map<String, String> responseParameters)
Verify response from Intuit
[Expand]
Inherited Methods
From class java.lang.Object

Fields

private String accessTokenIdentifierPrefix

Prefix used for storing credentials in ObjectStore. It will be concatenated to the access token identifier.

E.g. prefix: "qb_", user identifier (realmId): "12345", key for object store "qb_12345"

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 QuickBooksOnlineClient client

Quick-Books client. By default uses DefaultQuickBooksOnlineClient class.

private String consumerKey

API Key

private String consumerSecret

API Secret

private ObjectStore objectStore

Object store reference

private ObjectStoreHelper objectStoreHelper

Object store helper

private boolean verifyOpenIdResponse

Specifies if the OpenID response will be verified. By default it is true.

Public Constructors

public QuickBooksModule ()

Public Methods

public String authUser (String requestTokenUrl, String accessTokenUrl, String authorizationUrl, String callbackUrl, String requestTokenId, Map<String, Object> headers)

Authorize an user using OAuth1.0a

Parameters
requestTokenUrl RequestTokenUrl
accessTokenUrl AccessTokenUrl
authorizationUrl AuthorizationUrl
callbackUrl CallbackUrl for OAuth service
requestTokenId Optional value for identifying the requestToken. If it is not passed the client will use a UUID
headers Outbound headers
Returns
  • Authorize Url
Throws
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

public Iterable changeDataDeleted (String accessTokenId, String queryFilter, String querySort)

Gets all of the transactions and objects that have been deleted on the Data Services server For details see: ChangeDataDeleted

Parameters
accessTokenId Identifier for QuickBooks credentials.
queryFilter String with a filter format (see details). Each type of object to be retrieved, has a list of attributes for which it can be filtered (See this list following the link in the details of the documentation of the create or update method of that object).
querySort String with a sort format (see details). Each type of object to be retrieved, has a list of attributes for which it can be sorted (See this list following the link in the details of the documentation of the create or update method of that object).
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 Account createAccount (String accessTokenId, Account account)

Creates an Account. The Account object represents the accounts that you keep to track your business. Account is a component of a chart of accounts, and is part of a ledger. You can use Account to record the total monetary amount that is allocated for a specific use. For details see: Account Specification

Parameters
accessTokenId Identifier for QuickBooks credentials.
account The Quickbooks account to be created.
Returns
  • The created Account.

public Bill createBill (String accessTokenId, Bill bill)

Creates a Bill. The Bill object represents an expense to the business. For details see: Bill Specification

Parameters
accessTokenId Identifier for QuickBooks credentials.
bill The bill to be created
Returns
  • The created Bill.

public BillPayment createBillPayment (String accessTokenId, BillPayment billPayment)

Creates a BillPayment. BillPayment represents the financial transaction of payment of bills that the business owner receives from a vendor for goods or services purchased from the vendor. QBO supports bill payments through a credit card or a bank account. For details see: BillPayment Specification

Parameters
accessTokenId Identifier for QuickBooks credentials.
billPayment The bill payment object
Returns
  • The created BillPayment.
Throws
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

public CashPurchase createCashPurchase (String accessTokenId, CashPurchase cashPurchase)

Creates a CashPurchase. CashPurchase represents an expense to the business as a cash transaction. For details see: CashPurchase Specification

Parameters
accessTokenId Identifier for QuickBooks credentials.
cashPurchase The cash purchase to be created
Returns
  • The created CashPurchase.
Throws
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

public Check createCheck (String accessTokenId, Check check)

Creates a Check. The Check object represents an expense to the business paid as a check transaction. For details see: Check Specification

Parameters
accessTokenId Identifier for QuickBooks credentials.
check The check to be created
Returns
  • The created Check.
Throws
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

public CreditCardCharge createCreditCardCharge (String accessTokenId, CreditCardCharge creditCardCharge)

Creates a CreditCardCharge. The CreditCardCharge object represents an expense to the business as a credit card charge transaction. CreditCardCharge must have the total expense equal to the total expense of line items. For details see: CreditCardCharge Specification

Parameters
accessTokenId Identifier for QuickBooks credentials.
creditCardCharge The credit card charge to be created
Returns
  • The created CreditCardCharge.
Throws
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

public Customer createCustomer (String accessTokenId, Customer customer)

Creates a Customer. The Customer object represents the consumer of the service or the product that your business offers. QBO allows categorizing the customers in a way that is meaningful to the business. For details see: Customer Specification

Parameters
accessTokenId Identifier for QuickBooks credentials.
customer The customer to be created
Returns
  • The created Customer.
Throws
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

public Estimate createEstimate (String accessTokenId, Estimate estimate)

Creates an Estimate. The Estimate object represents a proposal for a financial transaction from a business to a customer for goods or services proposed to be sold, including proposed pricing. It is also known as quote. For details see: Estimate Specification

Parameters
accessTokenId Identifier for QuickBooks credentials.
estimate The estimate to be created
Returns
  • The created Estimate.
Throws
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

public Invoice createInvoice (String accessTokenId, Invoice invoice)

Creates an Invoice. The Invoice object represents an invoice to a customer. Invoice could be based on salesterm with invoice and due dates for payment. Invoice supports tax, but as of now shipping charges are not supported. Invoice can be printed and emailed to a customer. For details see: Invoice Specification

Parameters
accessTokenId Identifier for QuickBooks credentials.
invoice The invoice to be created
Returns
  • The created Invoice.
Throws
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

public Item createItem (String accessTokenId, Item item)

Creates an Item. The Item object represents any product or service that is sold or purchased. Inventory items are not currently supported. For details see: Item Specification

Parameters
accessTokenId Identifier for QuickBooks credentials.
item The item to be created
Returns
  • The created Item.
Throws
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

public Payment createPayment (String accessTokenId, Payment payment)

Creates a Payment. The Payment object represents the financial transaction that signifies a payment from a customer for one or more sales transactions. For details see: Payment Specification

Parameters
accessTokenId Identifier for QuickBooks credentials.
payment The payment to be created
Returns
  • The created Payment.
Throws
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

public PaymentMethod createPaymentMethod (String accessTokenId, PaymentMethod paymentMethod)

Creates a PaymentMethod. PaymentMethod represents the method of payment for a transaction. It can be a credit card payment type or a non-credit card payment type. For details see: PaymentMethod Specification

Parameters
accessTokenId Identifier for QuickBooks credentials.
paymentMethod The payment method to be created
Returns
  • The created PaymentMethod.
Throws
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

public SalesReceipt createSalesReceipt (String accessTokenId, SalesReceipt salesReceipt)

Creates a SalesReceipt. The Payment object represents the financial transaction that signifies a payment from a customer for one or more sales transactions. For details see: SalesReceipt Specification

Parameters
accessTokenId Identifier for QuickBooks credentials.
salesReceipt The sales receipt to be created
Returns
  • The created SalesReceipt.
Throws
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

public SalesTerm createSalesTerm (String accessTokenId, SalesTerm salesTerm)

Creates a SalesTerm. The SalesTerm object represents the terms under which a sale is made. SalesTerm is typically expressed in the form of days due after the goods are received. There is an optional discount part of the sales term, where a discount of total amount can automatically be applied if payment is made within a few days of the stipulated time. For details see: SalesTerm Specification

Parameters
accessTokenId Identifier for QuickBooks credentials.
salesTerm The sales term to be created
Returns
  • The created SalesTerm.
Throws
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

public Vendor createVendor (String accessTokenId, Vendor vendor)

Creates a Vendor. The Vendor object represents the buyer from whom you purchase any service or product for your organization. For details see: Vendor Specification

Parameters
accessTokenId Identifier for QuickBooks credentials.
vendor The vendor to be created
Returns
  • The created Vendor.
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 deleteObject (String accessTokenId, OnlineEntityType type, IdType id, String syncToken)

Deletes an object.

Parameters
accessTokenId Identifier for QuickBooks credentials.
type EntityType of the object.
id Id which is assigned by Data Services when the object is created.
syncToken Integer that indicates how many times the object has been updated. Before performing the update, Data Services verifies that the SyncToken in the request has the same value as the SyncToken in the Data Service's repository.

public boolean disconnect (String accessTokenId)

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

Parameters
accessTokenId Credentials identifier for the user information to be requested
Returns
  • true if the user was disconnect from QBO

public Iterable findObjects (String accessTokenId, OnlineEntityType type, String queryFilter, String querySort)

Lazily retrieves Objects For details see: Vendor Specification

Parameters
accessTokenId Identifier for QuickBooks credentials.
type EntityType of the object.
queryFilter String with a filter format (see details). Each type of object to be retrieved, has a list of attributes for which it can be filtered (See this list following the link in the details of the documentation of the create or update method of that object).
querySort String with a sort format (see details). Each type of object to be retrieved, has a list of attributes for which it can be sorted (See this list following the link in the details of the documentation of the create or update method of that object).
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 OAuthCredentials getAccessToken (String apiUrl, String verifier, String requestTokenId, String userIdentifier)

Extract accessToken

Parameters
apiUrl API URL
verifier OAuth verifier. It comes within the callback. The default value is "#[header:inbound:oauth_verifier]"
requestTokenId Id used for identifying the authorized request token. It comes within the callback. By default the query string parameter is userId
userIdentifier Id used for store the accessToken in the Object Store. By default the value is the realmId
Returns
  • credentials user credentials
Throws
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

public String getAccessTokenIdentifierPrefix ()

public String getBaseUri ()

public List<AppMenuInformation> getBlueDotInformation (String accessTokenId, String regex)

Gets blueDot menu information from Intuit

Parameters
accessTokenId Credentials identifier for the user information to be requested
regex Regex for extracting the information

The regex has to extract the information in this way:

match[0]: "appId,appName,contextArea"

match[1]: "logoImageUrl"

The method will split the application information to generate the @link{AppMenuInformation} object

Returns
  • list with AppMenu information from Intuit

public QuickBooksOnlineClient getClient ()

public Object getCompanyMetadata (String accessTokenId)

Returns company metadata information. For details see: CompanyMetaData

Parameters
accessTokenId Identifier for QuickBooks credentials.
Returns
  • company metadata

public String getConsumerKey ()

public String getConsumerSecret ()

public UserInformation getCurrentUser (String accessTokenId)

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

Parameters
accessTokenId Identifier for QuickBooks credentials.
Returns
  • current user information

public Object getObject (String accessTokenId, OnlineEntityType type, IdType id)

Retrieve objects by ID.

Parameters
accessTokenId Identifier for QuickBooks credentials.
type EntityType 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 ObjectStore getObjectStore ()

public ObjectStoreHelper getObjectStoreHelper ()

public boolean getVerifyOpenIdResponse ()

public void init ()

Generates the QuickbooksOnlineClient

public String openIdInitialize (String providerUrl, String callbackUrl, Map<String, Object> headers)

Initializes OpenID process

Parameters
providerUrl OpenID provider url
callbackUrl OpenID callbackUrl. It has to point to an endpoint callback to process the response
headers OpenId response headers
Returns
  • url to redirect the user
Throws
ObjectStoreException if the operation cannot store the OpenIDManagers

public void reconnect (String accessTokenId)

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.

Parameters
accessTokenId Credentials identifier for the user information to be requested
Throws
ObjectStoreException if the credentials store failed

public void setAccessTokenIdentifierPrefix (String accessTokenIdentifierPrefix)

Parameters
accessTokenIdentifierPrefix

public void setBaseUri (String baseUri)

Parameters
baseUri

public void setClient (QuickBooksOnlineClient client)

Parameters
client

public void setConsumerKey (String consumerKey)

Parameters
consumerKey

public void setConsumerSecret (String consumerSecret)

Parameters
consumerSecret

public void setObjectStore (ObjectStore objectStore)

Parameters
objectStore

public void setObjectStoreHelper (ObjectStoreHelper objectStoreHelper)

Parameters
objectStoreHelper

public void setVerifyOpenIdResponse (boolean verifyOpenIdResponse)

Parameters
verifyOpenIdResponse

public Account updateAccount (String accessTokenId, Account account)

Updates an Account The Account object represents the accounts that you keep to track your business. Account is a component of a chart of accounts, and is part of a ledger. You can use Account to record the total monetary amount that is allocated for a specific use. 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 see: Account Specification

Parameters
accessTokenId Identifier for QuickBooks credentials.
account The account to be updated
Returns
  • The updated Account.
Throws
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

public Bill updateBill (String accessTokenId, Bill bill)

Updates a Bill The Bill object represents an expense to the business. 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 see: Bill Specification

Parameters
accessTokenId Identifier for QuickBooks credentials.
bill The bill to be updated
Returns
  • The updated Bill.
Throws
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

public BillPayment updateBillPayment (String accessTokenId, BillPayment billPayment)

Updates a BillPayment BillPayment represents the financial transaction of payment of bills that the business owner receives from a vendor for goods or services purchased from the vendor. QBO supports bill payments through a credit card or a bank account. 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 see: BillPayment Specification

Parameters
accessTokenId Identifier for QuickBooks credentials.
billPayment Bill payment to be updated
Returns
  • The updated BillPayment.
Throws
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

public CashPurchase updateCashPurchase (String accessTokenId, CashPurchase cashPurchase)

Updates a CashPurchase. CashPurchase represents an expense to the business as a cash transaction. 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 see: CashPurchase Specification

Parameters
accessTokenId Identifier for QuickBooks credentials.
cashPurchase The cash purchase to be updated
Returns
  • The updated CashPurchase.
Throws
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

public Check updateCheck (String accessTokenId, Check check)

Updates a Check. The Check object represents an expense to the business paid as a check transaction. 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 see: Check Specification

Parameters
accessTokenId Identifier for QuickBooks credentials.
check The check to be updated
Returns
  • The updated Check.
Throws
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

public CreditCardCharge updateCreditCardCharge (String accessTokenId, CreditCardCharge creditCardCharge)

Updates a CreditCardCharge. The CreditCardCharge object represents an expense to the business as a credit card charge transaction. CreditCardCharge must have the total expense equal to the total expense of line items. 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 see: CreditCardCharge Specification

Parameters
accessTokenId Identifier for QuickBooks credentials.
creditCardCharge The credit card charge to be updated
Returns
  • The updated CreditCardCharge.
Throws
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

public Customer updateCustomer (String accessTokenId, Customer customer)

Updates a Customer. The Customer object represents the consumer of the service or the product that your business offers. QBO allows categorizing the customers in a way that is meaningful to the business. 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 see: Customer Specification

Parameters
accessTokenId Identifier for QuickBooks credentials.
customer The customer to be updated
Returns
  • The updated Customer.
Throws
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

public Estimate updateEstimate (String accessTokenId, Estimate estimate)

Updates an Estimate. The Estimate object represents a proposal for a financial transaction from a business to a customer for goods or services proposed to be sold, including proposed pricing. It is also known as quote. 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 see: Estimate Specification

Parameters
accessTokenId Identifier for QuickBooks credentials.
estimate The estimate to be updated
Returns
  • The updated Estimate.
Throws
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

public Invoice updateInvoice (String accessTokenId, Invoice invoice)

Updates an Invoice. The Invoice object represents an invoice to a customer. Invoice could be based on salesterm with invoice and due dates for payment. Invoice supports tax, but as of now shipping charges are not supported. Invoice can be printed and emailed to a customer. 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 see: Invoice Specification

Parameters
accessTokenId Identifier for QuickBooks credentials.
invoice The invoice to be updated
Returns
  • The updated Invoice.
Throws
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

public Item updateItem (String accessTokenId, Item item)

Updates an Item. The Item object represents any product or service that is sold or purchased. Inventory items are not currently supported. 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 see: Item Specification

Parameters
accessTokenId Identifier for QuickBooks credentials.
item The item to be updated
Returns
  • The updated Item.
Throws
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

public Payment updatePayment (String accessTokenId, Payment payment)

Updates a Payment. The Payment object represents the financial transaction that signifies a payment from a customer for one or more sales transactions. 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 see: Payment Specification

Parameters
accessTokenId Identifier for QuickBooks credentials.
payment The payment to be updated
Returns
  • The updated Payment.
Throws
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

public PaymentMethod updatePaymentMethod (String accessTokenId, PaymentMethod paymentMethod)

Updates a PaymentMethod. PaymentMethod represents the method of payment for a transaction. It can be a credit card payment type or a non-credit card payment type. 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 see: PaymentMethod Specification

Parameters
accessTokenId Identifier for QuickBooks credentials.
paymentMethod The payment method to be updated
Returns
  • The updated PaymentMethod.
Throws
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

public SalesReceipt updateSalesReceipt (String accessTokenId, SalesReceipt salesReceipt)

Updates a SalesReceipt. The Payment object represents the financial transaction that signifies a payment from a customer for one or more sales transactions. 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 see: SalesReceipt Specification

Parameters
accessTokenId Identifier for QuickBooks credentials.
salesReceipt The sales receipt
Returns
  • The updated SalesReceipt.
Throws
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

public SalesTerm updateSalesTerm (String accessTokenId, SalesTerm salesTerm)

Updates a SalesTerm. The SalesTerm object represents the terms under which a sale is made. SalesTerm is typically expressed in the form of days due after the goods are received. There is an optional discount part of the sales term, where a discount of total amount can automatically be applied if payment is made within a few days of the stipulated time. 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 see: SalesTerm Specification

Parameters
accessTokenId Identifier for QuickBooks credentials.
salesTerm The sales term to be updated
Returns
  • The updated SalesTerm.
Throws
QuickBooksRuntimeException when there is a problem with the server. It has a code and a message provided by quickbooks about the error.

public Vendor updateVendor (String accessTokenId, Vendor vendor)

Updates a Vendor. The Vendor object represents the buyer from whom you purchase any service or product for your organization. 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 see: Vendor Specification

Parameters
accessTokenId Identifier for QuickBooks credentials.
vendor The vendor to be updated
Returns
  • The updated Vendor.

public OpenIDCredentials verifyOpenId (MuleMessage muleMessage, String receivingUrl, Map<String, String> responseParameters)

Verify response from Intuit

Parameters
muleMessage Injected MuleMessage
receivingUrl Url from OpenID provider.

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

responseParameters Response parameters from Intuit. It process a map with all the OpenID attributes sent from Intuit.
Returns
  • OpenID credentials for the authenticated user
Throws
MessageException from OpenID manager
ObjectStoreException if the operation cannot retrieve OpenID managers from ObjectStore