0.0.3 • Published 3 years ago

@eld0ud/quickbooks-node-promise v0.0.3

Weekly downloads
23
License
ISC
Repository
github
Last release
3 years ago

Overview

This library was created for Quickbooks OAuth2. It converted a lot of node-quickbooks into promises.

Will handle the authentication and auto renew Access Tokens when they are expired.

Example grabbing resource

const QuickBooks = require("quickbooks-node-promise");
const qbo = new QuickBooks(appConfig, realmID);
const customers = await qbo.findCustomers({ Id: "1234" });
const customer = customer.QueryResponse.Customer[0]
console.log(`Hi my customer's name is ${customer.Name}`)

Setup

Check the example for node express setup endpoints

Install

npm i quickbooks-node-promise

Create Store Strategy

The store strategy is used to Save and Retreive token information. Both methods return a promise.

class QBStoreStrategy {
  /**
   * Uses a realmID to lookup the token information.
   * Should return back in an object
   * 
   * @param {number} realmID the quickbooks companyID
   * @returns {object} Promise
   */
  getQBToken({ realmID }) {
    return new Promise((resolve) => {
      // Get token infomraiton using realmID here

      // Return object which includes the access_expire_timestamp & refresh_expire_timestamp
      let newToken = {
        realmID: my_realm_id // optional but nice to have
        access_token: my_access_token,
        refresh_token: my_refresh_token,
        access_expire_timestamp: my_access_expire_timestamp,
        refresh_expire_timestamp: my_refresh_expire_timestamp,
        id_token: my_id_token // (Optional) Used only for user OpenID verification
      }
      resolve(newToken)
    })
  }

  /**
   * Used to store the new token information
   * Will be looked up using the realmID   
   * 
   * @param {number} realmID the quickbooks companyID
   * @param {object} token
   * @param {string} token.access_token used to access quickbooks resource
   * @param {string} token.refresh_token This should be securely stored
   * @param {number} token.expires_in access_token expire time in seconds, 3600 usually
   * @param {number} token.x_refresh_token_expires_in refresh_token expire time in seconds.
   * @param {string} token.id_token (Optional) OpenID user token - sent only on original access, not included in refresh token
   * @param {string} token.token_type This will be "Bearer"
   * @param {object} access_expire_timestamp JS Date object when the access_token expires, calculated from expires_in
   * @param {object} refresh_expire_timestamp JS Date object when the refresh_token expires, calculated from x_refresh_token_expires_in
   * @returns {object} Promise
   */
  storeQBToken({ realmID, token, access_expire_timestamp, refresh_expire_timestamp }) {
    return new Promise((resolve) => {
      // Store information to DB or your location here now
      saveToDB({
        realmID: realmID
        access_token: token.access_token,
        refresh_token: token.refresh_token,
        access_expire_timestamp: access_expire_timestamp,
        refresh_expire_timestamp: refresh_expire_timestamp,
        id_token: my_id_token // (Optional) Used only for user OpenID verification
      })

      // Return object which includes the access_expire_timestamp & refresh_expire_timestamp
      let newToken = {
        realmID: my_realm_id
        access_token: my_access_token,
        refresh_token: my_refresh_token,
        access_expire_timestamp: my_access_expire_timestamp,
        refresh_expire_timestamp: my_refresh_expire_timestamp,
        id_token: my_id_token // (Optional) Used only for user OpenID verification
      }
      resolve(newToken)
    })
  }
}

Config setup

A config setup is needed for each app. Some values have defaults but should supply your own

// QB config
QBAppconfig = {
  appKey: QB_APP_KEY,
  appSecret: QB_APP_SECRET,
  redirectUrl: QB_REDIRECT_URL,
  minorversion: 37, /* default if ommited is 37, check for your version in the documents */
  useProduction: QB_USE_PROD, /* default is false */
  debug: (NODE_ENV == "production" ? false : true), /* default is false */
  storeStrategy: new QBStoreStrategy(),  // if ommited uses storage inside the created object
  scope: [
    QuickBooks.scopes.Accounting,
    QuickBooks.scopes.OpenId,
    QuickBooks.scopes.Profile,
    QuickBooks.scopes.Email,
    QuickBooks.scopes.Phone,
    QuickBooks.scopes.Address
  ]
}

Scopes available:

QuickBooks.scopes = {
  Accounting: 'com.intuit.quickbooks.accounting',
  Payment: 'com.intuit.quickbooks.payment',
  Payroll: 'com.intuit.quickbooks.payroll',
  TimeTracking: 'com.intuit.quickbooks.payroll.timetracking',
  Benefits: 'com.intuit.quickbooks.payroll.benefits',
  Profile: 'profile',
  Email:  'email',
  Phone: 'phone',
  Address: 'address',
  OpenId: 'openid',
  Intuit_name: 'intuit_name'
}

QuickBooks Methods

Kind: global class

new QuickBooks(appConfig, realmID)

Node.js client encapsulating access to the QuickBooks V3 Rest API. An instance of this class should be instantiated on behalf of each user and company accessing the api.

ParamDescription
appConfigapplication information
realmIDQuickBooks companyId, returned as a request parameter when the user is redirected to the provided callback URL following authentication

quickBooks.authorizeUrl() ⇒ string

Redirect link to Authorization Page

Kind: instance method of QuickBooks
Returns: string - authorize Uri

quickBooks.createToken(authCode, realmID) ⇒ object

Creates new token for the realmID from the returned authorization code received in the callback request

Kind: instance method of QuickBooks
Returns: object - new token with expiration dates from storeStrategy

ParamTypeDescription
authCodestringThe code returned in your callback as a param called "code"
realmIDnumberThe company identifier in your callback as a param called "realmId"

quickBooks.saveToken(token)

Save token

Kind: instance method of QuickBooks

ParamTypeDescription
tokenobjectthe token to send to store area

quickBooks.getToken()

Get token

Kind: instance method of QuickBooks

quickBooks.refreshWithAccessToken(token) ⇒ Token

Use the refresh token to obtain a new access token.

Kind: instance method of QuickBooks
Returns: Token - returns fresh token with access_token and refresh_token

ParamTypeDescription
tokenTokenhas the refresh_token

quickBooks.refreshAccessToken() ⇒ Token

Use the refresh token to obtain a new access token.

Kind: instance method of QuickBooks
Returns: Token - returns fresh token with access_token and refresh_token

quickBooks.revokeAccess(useRefresh)

Use either refresh token or access token to revoke access (OAuth2).

Kind: instance method of QuickBooks

ParamDescription
useRefreshboolean - Indicates which token to use: true to use the refresh token, false to use the access token.

quickBooks.validateIdToken()

Validate id_token

Kind: instance method of QuickBooks

quickBooks.getPublicKey(modulus, exponent)

get Public Key

Kind: instance method of QuickBooks

Param
modulus
exponent

quickBooks.getUserInfo()

Get user info (OAuth2).

Kind: instance method of QuickBooks

quickBooks.batch(items)

Batch operation to enable an application to perform multiple operations in a single request. The following batch items are supported: create update delete query The maximum number of batch items in a single request is 25.

Kind: instance method of QuickBooks

ParamTypeDescription
itemsobjectJavaScript array of batch items

quickBooks.changeDataCapture(entities, since)

The change data capture (CDC) operation returns a list of entities that have changed since a specified time.

Kind: instance method of QuickBooks

ParamTypeDescription
entitiesobjectComma separated list or JavaScript array of entities to search for changes
sinceobject | number | stringJS Date object, JS Date milliseconds, or string in ISO 8601 - to look back for changes until

quickBooks.upload(filename, contentType, stream, entityType, entityId)

Uploads a file as an Attachable in QBO, optionally linking it to the specified QBO Entity.

Kind: instance method of QuickBooks

ParamTypeDescription
filenamestringthe name of the file
contentTypestringthe mime type of the file
streamobjectReadableStream of file contents
entityTypeobjectoptional string name of the QBO entity the Attachable will be linked to (e.g. Invoice)
entityIdobjectoptional Id of the QBO entity the Attachable will be linked to

quickBooks.createAccount(account)

Creates the Account in QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
accountobjectThe unsaved account, to be persisted in QuickBooks

quickBooks.createAttachable(attachable)

Creates the Attachable in QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
attachableobjectThe unsaved attachable, to be persisted in QuickBooks

quickBooks.createBill(bill)

Creates the Bill in QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
billobjectThe unsaved bill, to be persisted in QuickBooks

quickBooks.createBillPayment(billPayment)

Creates the BillPayment in QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
billPaymentobjectThe unsaved billPayment, to be persisted in QuickBooks

quickBooks.createClass(class)

Creates the Class in QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
classobjectThe unsaved class, to be persisted in QuickBooks

quickBooks.createCreditMemo(creditMemo)

Creates the CreditMemo in QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
creditMemoobjectThe unsaved creditMemo, to be persisted in QuickBooks

quickBooks.createCustomer(customer)

Creates the Customer in QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
customerobjectThe unsaved customer, to be persisted in QuickBooks

quickBooks.createDepartment(department)

Creates the Department in QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
departmentobjectThe unsaved department, to be persisted in QuickBooks

quickBooks.createDeposit(deposit)

Creates the Deposit in QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
depositobjectThe unsaved Deposit, to be persisted in QuickBooks

quickBooks.createEmployee(employee)

Creates the Employee in QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
employeeobjectThe unsaved employee, to be persisted in QuickBooks

quickBooks.createEstimate(estimate)

Creates the Estimate in QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
estimateobjectThe unsaved estimate, to be persisted in QuickBooks

quickBooks.createInvoice(invoice)

Creates the Invoice in QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
invoiceobjectThe unsaved invoice, to be persisted in QuickBooks

quickBooks.createItem(item)

Creates the Item in QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
itemobjectThe unsaved item, to be persisted in QuickBooks

quickBooks.createJournalCode(journalCode)

Creates the JournalCode in QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
journalCodeobjectThe unsaved journalCode, to be persisted in QuickBooks

quickBooks.createJournalEntry(journalEntry)

Creates the JournalEntry in QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
journalEntryobjectThe unsaved journalEntry, to be persisted in QuickBooks

quickBooks.createPayment(payment)

Creates the Payment in QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
paymentobjectThe unsaved payment, to be persisted in QuickBooks

quickBooks.createPaymentMethod(paymentMethod)

Creates the PaymentMethod in QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
paymentMethodobjectThe unsaved paymentMethod, to be persisted in QuickBooks

quickBooks.createPurchase(purchase)

Creates the Purchase in QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
purchaseobjectThe unsaved purchase, to be persisted in QuickBooks

quickBooks.createPurchaseOrder(purchaseOrder)

Creates the PurchaseOrder in QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
purchaseOrderobjectThe unsaved purchaseOrder, to be persisted in QuickBooks

quickBooks.createRefundReceipt(refundReceipt)

Creates the RefundReceipt in QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
refundReceiptobjectThe unsaved refundReceipt, to be persisted in QuickBooks

quickBooks.createSalesReceipt(salesReceipt)

Creates the SalesReceipt in QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
salesReceiptobjectThe unsaved salesReceipt, to be persisted in QuickBooks

quickBooks.createTaxAgency(taxAgency)

Creates the TaxAgency in QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
taxAgencyobjectThe unsaved taxAgency, to be persisted in QuickBooks

quickBooks.createTaxService(taxService)

Creates the TaxService in QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
taxServiceobjectThe unsaved taxService, to be persisted in QuickBooks

quickBooks.createTerm(term)

Creates the Term in QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
termobjectThe unsaved term, to be persisted in QuickBooks

quickBooks.createTimeActivity(timeActivity)

Creates the TimeActivity in QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
timeActivityobjectThe unsaved timeActivity, to be persisted in QuickBooks

quickBooks.createTransfer(transfer)

Creates the Transfer in QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
transferobjectThe unsaved Transfer, to be persisted in QuickBooks

quickBooks.createVendor(vendor)

Creates the Vendor in QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
vendorobjectThe unsaved vendor, to be persisted in QuickBooks

quickBooks.createVendorCredit(vendorCredit)

Creates the VendorCredit in QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
vendorCreditobjectThe unsaved vendorCredit, to be persisted in QuickBooks

quickBooks.getAccount(Id)

Retrieves the Account from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent Account

quickBooks.getAttachable(Id)

Retrieves the Attachable from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent Attachable

quickBooks.getBill(Id)

Retrieves the Bill from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent Bill

quickBooks.getBillPayment(Id)

Retrieves the BillPayment from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent BillPayment

quickBooks.getClass(Id)

Retrieves the Class from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent Class

quickBooks.getCompanyInfo(Id)

Retrieves the CompanyInfo from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent CompanyInfo

quickBooks.getCreditMemo(Id)

Retrieves the CreditMemo from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent CreditMemo

quickBooks.getCustomer(Id)

Retrieves the Customer from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent Customer

quickBooks.getDepartment(Id)

Retrieves the Department from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent Department

quickBooks.getDeposit(Id)

Retrieves the Deposit from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent Deposit

quickBooks.getEmployee(Id)

Retrieves the Employee from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent Employee

quickBooks.getEstimate(Id)

Retrieves the Estimate from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent Estimate

quickBooks.getExchangeRate(options)

Retrieves an ExchangeRate from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
optionsobjectAn object with options including the required sourcecurrencycode parameter and optional asofdate parameter.

quickBooks.getEstimatePdf(Id)

Retrieves the Estimate PDF from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent Estimate

quickBooks.sendEstimatePdf(Id, sendTo)

Emails the Estimate PDF from QuickBooks to the address supplied in Estimate.BillEmail.EmailAddress or the specified 'sendTo' address

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent Estimate
sendTostringoptional email address to send the PDF to. If not provided, address supplied in Estimate.BillEmail.EmailAddress will be used

quickBooks.getInvoice(Id)

Retrieves the Invoice from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent Invoice

quickBooks.getInvoicePdf(Id)

Retrieves the Invoice PDF from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent Invoice

quickBooks.sendInvoicePdf(Id, sendTo)

Emails the Invoice PDF from QuickBooks to the address supplied in Invoice.BillEmail.EmailAddress or the specified 'sendTo' address

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent Invoice
sendTostringoptional email address to send the PDF to. If not provided, address supplied in Invoice.BillEmail.EmailAddress will be used

quickBooks.getItem(Id)

Retrieves the Item from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent Item

quickBooks.getJournalCode(Id)

Retrieves the JournalCode from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent JournalCode

quickBooks.getJournalEntry(Id)

Retrieves the JournalEntry from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent JournalEntry

quickBooks.getPayment(Id)

Retrieves the Payment from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent Payment

quickBooks.getPaymentMethod(Id)

Retrieves the PaymentMethod from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent PaymentMethod

quickBooks.getPreferences()

Retrieves the Preferences from QuickBooks

Kind: instance method of QuickBooks

quickBooks.getPurchase(Id)

Retrieves the Purchase from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent Purchase

quickBooks.getPurchaseOrder(Id)

Retrieves the PurchaseOrder from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent PurchaseOrder

quickBooks.getRefundReceipt(Id)

Retrieves the RefundReceipt from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent RefundReceipt

quickBooks.getReports(Id)

Retrieves the Reports from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent Reports

quickBooks.getSalesReceipt(Id)

Retrieves the SalesReceipt from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent SalesReceipt

quickBooks.getSalesReceiptPdf(Id)

Retrieves the SalesReceipt PDF from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent SalesReceipt

quickBooks.sendSalesReceiptPdf(Id, sendTo)

Emails the SalesReceipt PDF from QuickBooks to the address supplied in SalesReceipt.BillEmail.EmailAddress or the specified 'sendTo' address

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent SalesReceipt
sendTostringoptional email address to send the PDF to. If not provided, address supplied in SalesReceipt.BillEmail.EmailAddress will be used

quickBooks.getTaxAgency(Id)

Retrieves the TaxAgency from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent TaxAgency

quickBooks.getTaxCode(Id)

Retrieves the TaxCode from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent TaxCode

quickBooks.getTaxRate(Id)

Retrieves the TaxRate from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent TaxRate

quickBooks.getTerm(Id)

Retrieves the Term from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent Term

quickBooks.getTimeActivity(Id)

Retrieves the TimeActivity from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent TimeActivity

quickBooks.getTransfer(Id)

Retrieves the Transfer from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent Term

quickBooks.getVendor(Id)

Retrieves the Vendor from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent Vendor

quickBooks.getVendorCredit(Id)

Retrieves the VendorCredit from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
IdstringThe Id of persistent VendorCredit

quickBooks.updateAccount(account)

Updates QuickBooks version of Account

Kind: instance method of QuickBooks

ParamTypeDescription
accountobjectThe persistent Account, including Id and SyncToken fields

quickBooks.updateAttachable(attachable)

Updates QuickBooks version of Attachable

Kind: instance method of QuickBooks

ParamTypeDescription
attachableobjectThe persistent Attachable, including Id and SyncToken fields

quickBooks.updateBill(bill)

Updates QuickBooks version of Bill

Kind: instance method of QuickBooks

ParamTypeDescription
billobjectThe persistent Bill, including Id and SyncToken fields

quickBooks.updateBillPayment(billPayment)

Updates QuickBooks version of BillPayment

Kind: instance method of QuickBooks

ParamTypeDescription
billPaymentobjectThe persistent BillPayment, including Id and SyncToken fields

quickBooks.updateClass(class)

Updates QuickBooks version of Class

Kind: instance method of QuickBooks

ParamTypeDescription
classobjectThe persistent Class, including Id and SyncToken fields

quickBooks.updateCompanyInfo(companyInfo)

Updates QuickBooks version of CompanyInfo

Kind: instance method of QuickBooks

ParamTypeDescription
companyInfoobjectThe persistent CompanyInfo, including Id and SyncToken fields

quickBooks.updateCreditMemo(creditMemo)

Updates QuickBooks version of CreditMemo

Kind: instance method of QuickBooks

ParamTypeDescription
creditMemoobjectThe persistent CreditMemo, including Id and SyncToken fields

quickBooks.updateCustomer(customer)

Updates QuickBooks version of Customer

Kind: instance method of QuickBooks

ParamTypeDescription
customerobjectThe persistent Customer, including Id and SyncToken fields

quickBooks.updateDepartment(department)

Updates QuickBooks version of Department

Kind: instance method of QuickBooks

ParamTypeDescription
departmentobjectThe persistent Department, including Id and SyncToken fields

quickBooks.updateDeposit(deposit)

Updates QuickBooks version of Deposit

Kind: instance method of QuickBooks

ParamTypeDescription
depositobjectThe persistent Deposit, including Id and SyncToken fields

quickBooks.updateEmployee(employee)

Updates QuickBooks version of Employee

Kind: instance method of QuickBooks

ParamTypeDescription
employeeobjectThe persistent Employee, including Id and SyncToken fields

quickBooks.updateEstimate(estimate)

Updates QuickBooks version of Estimate

Kind: instance method of QuickBooks

ParamTypeDescription
estimateobjectThe persistent Estimate, including Id and SyncToken fields

quickBooks.updateInvoice(invoice)

Updates QuickBooks version of Invoice

Kind: instance method of QuickBooks

ParamTypeDescription
invoiceobjectThe persistent Invoice, including Id and SyncToken fields

quickBooks.updateItem(item)

Updates QuickBooks version of Item

Kind: instance method of QuickBooks

ParamTypeDescription
itemobjectThe persistent Item, including Id and SyncToken fields

quickBooks.updateJournalCode(journalCode)

Updates QuickBooks version of JournalCode

Kind: instance method of QuickBooks

ParamTypeDescription
journalCodeobjectThe persistent JournalCode, including Id and SyncToken fields

quickBooks.updateJournalEntry(journalEntry)

Updates QuickBooks version of JournalEntry

Kind: instance method of QuickBooks

ParamTypeDescription
journalEntryobjectThe persistent JournalEntry, including Id and SyncToken fields

quickBooks.updatePayment(payment)

Updates QuickBooks version of Payment

Kind: instance method of QuickBooks

ParamTypeDescription
paymentobjectThe persistent Payment, including Id and SyncToken fields

quickBooks.updatePaymentMethod(paymentMethod)

Updates QuickBooks version of PaymentMethod

Kind: instance method of QuickBooks

ParamTypeDescription
paymentMethodobjectThe persistent PaymentMethod, including Id and SyncToken fields

quickBooks.updatePreferences(preferences)

Updates QuickBooks version of Preferences

Kind: instance method of QuickBooks

ParamTypeDescription
preferencesobjectThe persistent Preferences, including Id and SyncToken fields

quickBooks.updatePurchase(purchase)

Updates QuickBooks version of Purchase

Kind: instance method of QuickBooks

ParamTypeDescription
purchaseobjectThe persistent Purchase, including Id and SyncToken fields

quickBooks.updatePurchaseOrder(purchaseOrder)

Updates QuickBooks version of PurchaseOrder

Kind: instance method of QuickBooks

ParamTypeDescription
purchaseOrderobjectThe persistent PurchaseOrder, including Id and SyncToken fields

quickBooks.updateRefundReceipt(refundReceipt)

Updates QuickBooks version of RefundReceipt

Kind: instance method of QuickBooks

ParamTypeDescription
refundReceiptobjectThe persistent RefundReceipt, including Id and SyncToken fields

quickBooks.updateSalesReceipt(salesReceipt)

Updates QuickBooks version of SalesReceipt

Kind: instance method of QuickBooks

ParamTypeDescription
salesReceiptobjectThe persistent SalesReceipt, including Id and SyncToken fields

quickBooks.updateTaxAgency(taxAgency)

Updates QuickBooks version of TaxAgency

Kind: instance method of QuickBooks

ParamTypeDescription
taxAgencyobjectThe persistent TaxAgency, including Id and SyncToken fields

quickBooks.updateTaxCode(taxCode)

Updates QuickBooks version of TaxCode

Kind: instance method of QuickBooks

ParamTypeDescription
taxCodeobjectThe persistent TaxCode, including Id and SyncToken fields

quickBooks.updateTaxRate(taxRate)

Updates QuickBooks version of TaxRate

Kind: instance method of QuickBooks

ParamTypeDescription
taxRateobjectThe persistent TaxRate, including Id and SyncToken fields

quickBooks.updateTerm(term)

Updates QuickBooks version of Term

Kind: instance method of QuickBooks

ParamTypeDescription
termobjectThe persistent Term, including Id and SyncToken fields

quickBooks.updateTimeActivity(timeActivity)

Updates QuickBooks version of TimeActivity

Kind: instance method of QuickBooks

ParamTypeDescription
timeActivityobjectThe persistent TimeActivity, including Id and SyncToken fields

quickBooks.updateTransfer(Transfer)

Updates QuickBooks version of Transfer

Kind: instance method of QuickBooks

ParamTypeDescription
TransferobjectThe persistent Transfer, including Id and SyncToken fields

quickBooks.updateVendor(vendor)

Updates QuickBooks version of Vendor

Kind: instance method of QuickBooks

ParamTypeDescription
vendorobjectThe persistent Vendor, including Id and SyncToken fields

quickBooks.updateVendorCredit(vendorCredit)

Updates QuickBooks version of VendorCredit

Kind: instance method of QuickBooks

ParamTypeDescription
vendorCreditobjectThe persistent VendorCredit, including Id and SyncToken fields

quickBooks.updateExchangeRate(exchangeRate)

Updates QuickBooks version of ExchangeRate

Kind: instance method of QuickBooks

ParamTypeDescription
exchangeRateobjectThe persistent ExchangeRate, including Id and SyncToken fields

quickBooks.deleteAttachable(idOrEntity)

Deletes the Attachable from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
idOrEntityobjectThe persistent Attachable to be deleted, or the Id of the Attachable, in which case an extra GET request will be issued to first retrieve the Attachable

quickBooks.deleteBill(idOrEntity)

Deletes the Bill from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
idOrEntityobjectThe persistent Bill to be deleted, or the Id of the Bill, in which case an extra GET request will be issued to first retrieve the Bill

quickBooks.deleteBillPayment(idOrEntity)

Deletes the BillPayment from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
idOrEntityobjectThe persistent BillPayment to be deleted, or the Id of the BillPayment, in which case an extra GET request will be issued to first retrieve the BillPayment

quickBooks.deleteCreditMemo(idOrEntity)

Deletes the CreditMemo from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
idOrEntityobjectThe persistent CreditMemo to be deleted, or the Id of the CreditMemo, in which case an extra GET request will be issued to first retrieve the CreditMemo

quickBooks.deleteDeposit(idOrEntity)

Deletes the Deposit from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
idOrEntityobjectThe persistent Deposit to be deleted, or the Id of the Deposit, in which case an extra GET request will be issued to first retrieve the Deposit

quickBooks.deleteEstimate(idOrEntity)

Deletes the Estimate from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
idOrEntityobjectThe persistent Estimate to be deleted, or the Id of the Estimate, in which case an extra GET request will be issued to first retrieve the Estimate

quickBooks.deleteInvoice(idOrEntity)

Deletes the Invoice from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
idOrEntityobjectThe persistent Invoice to be deleted, or the Id of the Invoice, in which case an extra GET request will be issued to first retrieve the Invoice

quickBooks.deleteJournalCode(idOrEntity)

Deletes the JournalCode from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
idOrEntityobjectThe persistent JournalCode to be deleted, or the Id of the JournalCode, in which case an extra GET request will be issued to first retrieve the JournalCode

quickBooks.deleteJournalEntry(idOrEntity)

Deletes the JournalEntry from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
idOrEntityobjectThe persistent JournalEntry to be deleted, or the Id of the JournalEntry, in which case an extra GET request will be issued to first retrieve the JournalEntry

quickBooks.deletePayment(idOrEntity)

Deletes the Payment from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
idOrEntityobjectThe persistent Payment to be deleted, or the Id of the Payment, in which case an extra GET request will be issued to first retrieve the Payment

quickBooks.deletePurchase(idOrEntity)

Deletes the Purchase from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
idOrEntityobjectThe persistent Purchase to be deleted, or the Id of the Purchase, in which case an extra GET request will be issued to first retrieve the Purchase

quickBooks.deletePurchaseOrder(idOrEntity)

Deletes the PurchaseOrder from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
idOrEntityobjectThe persistent PurchaseOrder to be deleted, or the Id of the PurchaseOrder, in which case an extra GET request will be issued to first retrieve the PurchaseOrder

quickBooks.deleteRefundReceipt(idOrEntity)

Deletes the RefundReceipt from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
idOrEntityobjectThe persistent RefundReceipt to be deleted, or the Id of the RefundReceipt, in which case an extra GET request will be issued to first retrieve the RefundReceipt

quickBooks.deleteSalesReceipt(idOrEntity)

Deletes the SalesReceipt from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
idOrEntityobjectThe persistent SalesReceipt to be deleted, or the Id of the SalesReceipt, in which case an extra GET request will be issued to first retrieve the SalesReceipt

quickBooks.deleteTimeActivity(idOrEntity)

Deletes the TimeActivity from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
idOrEntityobjectThe persistent TimeActivity to be deleted, or the Id of the TimeActivity, in which case an extra GET request will be issued to first retrieve the TimeActivity

quickBooks.deleteTransfer(idOrEntity)

Deletes the Transfer from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
idOrEntityobjectThe persistent Transfer to be deleted, or the Id of the Transfer, in which case an extra GET request will be issued to first retrieve the Transfer

quickBooks.deleteVendorCredit(idOrEntity)

Deletes the VendorCredit from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
idOrEntityobjectThe persistent VendorCredit to be deleted, or the Id of the VendorCredit, in which case an extra GET request will be issued to first retrieve the VendorCredit

quickBooks.voidInvoice(idOrEntity)

Voids the Invoice from QuickBooks

Kind: instance method of QuickBooks

ParamTypeDescription
idOrEntityobjectThe persistent Invoice to be voided, or the Id of the Invoice, in which case an extra GET request will be issued to first retrieve the Invoice

quickBooks.voidPayment(payment)

Voids QuickBooks version of Payment

Kind: instance method of QuickBooks

ParamTypeDescription
paymentobjectThe persistent Payment, including Id and SyncToken fields

quickBooks.findAccounts(criteria)

Finds all Accounts in QuickBooks, optionally matching the specified criteria

Kind: instance method of QuickBooks

ParamTypeDescription
criteriaobject(Optional) String or single-valued map converted to a where clause of the form "where key = 'value'"

quickBooks.findAttachables(criteria)

Finds all Attachables in QuickBooks, optionally matching the specified criteria

Kind: instance method of QuickBooks

ParamTypeDescription
criteriaobject(Optional) String or single-val