├── .gitignore ├── .npmignore ├── README.md ├── build ├── create.txt ├── delete.txt ├── generator │ ├── .gitignore │ ├── project.clj │ └── src │ │ └── generator │ │ └── core.clj ├── query.txt ├── report.txt ├── retrieve.txt └── update.txt ├── config.js ├── example ├── .gitignore ├── app.js ├── package.json └── views │ └── intuit.ejs ├── index.js ├── oauth2example ├── .gitignore ├── app.js ├── package.json └── views │ └── intuit.ejs ├── package-lock.json ├── package.json └── test ├── batch.js ├── cdc.js ├── charge.js └── index.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | build/generated.txt 3 | .idea 4 | **/junk** 5 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | build 2 | .idea 3 | **/junk** -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # node-quickbooks 2 | 3 | nodejs client for Intuit's [QuickBooks API](https://developer.intuit.com/app/developer/qbo/docs/develop) 4 | 5 | ## Installation 6 | 7 | `npm install node-quickbooks` 8 | 9 | 10 | ## Documentation 11 | 12 | ```javascript 13 | 14 | var QuickBooks = require('node-quickbooks') 15 | 16 | var qbo = new QuickBooks(consumerKey, 17 | consumerSecret, 18 | oauthToken, 19 | false, // no token secret for oAuth 2.0 20 | realmId, 21 | false, // use the sandbox? 22 | true, // enable debugging? 23 | null, // set minorversion, or null for the latest version 24 | '2.0', //oAuth version 25 | refreshToken); 26 | 27 | qbo.createAttachable({Note: 'My File'}, function(err, attachable) { 28 | if (err) console.log(err) 29 | else console.log(attachable.Id) 30 | }) 31 | 32 | qbo.getBillPayment('42', function(err, billPayment) { 33 | console.log(billPayment) 34 | }) 35 | 36 | qbo.updateCustomer({ 37 | Id: '42', 38 | SyncToken: '1', 39 | sparse: true, 40 | PrimaryEmailAddr: {Address: 'customer@example.com'} 41 | }, function(err, customer) { 42 | if (err) console.log(err) 43 | else console.log(customer) 44 | }) 45 | 46 | qbo.deleteAttachable('42', function(err, attachable) { 47 | if (err) console.log(err) 48 | else console.log(attachable) 49 | })) 50 | 51 | qbo.findAccounts({ 52 | AccountType: 'Expense', 53 | desc: 'MetaData.LastUpdatedTime', 54 | limit: 5, 55 | offset: 5 56 | }, function(err, accounts) { 57 | accounts.QueryResponse.Account.forEach(function(account) { 58 | console.log(account.Name) 59 | }) 60 | }) 61 | 62 | qbo.reportBalanceSheet({department: '1,4,7'}, function(err, balanceSheet) { 63 | console.log(balanceSheet) 64 | }) 65 | 66 | qbo.upload( 67 | 'contractor.jpg', 68 | 'image/jpeg', 69 | fs.createReadStream('contractor.jpg'), 70 | 'Invoice', 71 | 40, 72 | function(err, data) { 73 | console.log(err) 74 | console.log(data) 75 | }) 76 | 77 | ``` 78 | 79 | #### Query 80 | 81 | ###### Filters 82 | All query functions take an optional first argument object which will be converted to a 83 | where clause by means of the keys and values of the object used as column names and parameter values of the where clause. For example, in order to issue a query with a simple where clause such as, `select * from attachable where Note = 'My sample note field'`, the following code would be needed: 84 | ```javascript 85 | qbo.findAttachables({ 86 | Note: 'My sample note field' 87 | }, function(e, attachables) { 88 | console.log(attachables) 89 | }) 90 | ``` 91 | 92 | Alternatively, the object can be an array of objects, each specifying a `field`, `value` and `operator` (optional) keys. This allows you to build a more complex query using operators such as `=`, `IN`, `<`, `>`, `<=`, `>=`, or `LIKE`. 93 | ```javascript 94 | qbo.findTimeActivities([ 95 | {field: 'TxnDate', value: '2014-12-01', operator: '>'}, 96 | {field: 'TxnDate', value: '2014-12-03', operator: '<'}, 97 | {field: 'limit', value: 5} 98 | ], function (e, timeActivities) { 99 | console.log(timeActivities) 100 | }) 101 | ``` 102 | 103 | ###### Sorting 104 | Basic ordering is achieved via the optional first argument object as well. Include `asc` or `desc` keys in the object whose values are the columns you wish to sort on. For example: 105 | ```javascript 106 | qbo.findAttachables({ 107 | desc: 'MetaData.LastUpdatedTime' 108 | }, function(e, attachables) { 109 | console.log(attachables) 110 | }) 111 | ``` 112 | ###### Pagination 113 | Pagination is achieved via the optional first argument object as well. Include `limit` and/or `offset` keys in the object whose values are the number of rows you wish to limit the result set to or from respectively. For example: 114 | ```javascript 115 | qbo.findAttachables({ 116 | limit: 10, 117 | offset: 10 118 | }, function(e, attachables) { 119 | console.log(attachables) 120 | }) 121 | ``` 122 | 123 | The default (and max) limit is 1000 records returned in a single request. Adding a boolean `fetchAll` parameter 124 | will return all available records, transparently issuing as many requests as necessary to fetch them. So 125 | in the first example below, if your Quickbooks business contains 5,000 customers, 5 http requests will be issued behind 126 | the scenes and finally your callback will be invoked with an array of those 5,000 customers passed to it. 127 | 128 | ```javascript 129 | qbo.findCustomers({ 130 | fetchAll: true 131 | }, function(e, customers) { 132 | console.log(customers) 133 | }) 134 | 135 | qbo.findCustomers([ 136 | {field: 'fetchAll', value: true}, 137 | {field: 'FamilyName', value: 'S%', operator: 'LIKE'} 138 | ], function(e, customers) { 139 | console.log(customers) 140 | }) 141 | ``` 142 | 143 | ###### Counts 144 | Row counts rather than full result sets can be obtained by passing the `count` key in the optional first argument object with a boolean true value. For example: 145 | ```javascript 146 | qbo.findAttachables({ 147 | count: true 148 | }, function(e, attachables) { 149 | console.log(attachables) 150 | }) 151 | ``` 152 | 153 | ## Example App 154 | 155 | The `example` directory contains a barebones Express application that demonstrates the OAuth workflow. 156 | 157 | ### Setup 158 | 159 | First navigate to the `example` directory and install the required dependencies from NPM 160 | 161 | npm install 162 | 163 | You will need to create an Intuit Developer account at and add your app's OAuth Consumer Key and Secret to `app.js`. Pay attention to which APIs (Payments, QuickBooks) you select during the application creation process, you will have to update `example/views/intuit.ejs` if you did not select both. 164 | ### Running 165 | 166 | Start the app 167 | 168 | node app.js 169 | 170 | Browse to http://localhost:3000/start and you will see a page containing only the Intuit Developer Javascript-rendered button. Clicking on this kicks off the OAuth exchange. 171 | 172 | The Intuit Developer Javascript code calls back into the node application, which needs to invoke the OAuth Request Token URL at https://oauth.intuit.com/oauth/v1/get_request_token via a server-side http POST method. Note how the response from the http POST is parsed and the browser is redirected to the App Center URL at https://appcenter.intuit.com/Connect/Begin?oauth_token= with the `oauth_token` passed as a URL parameter. Note also how the `oauth_token_secret` needs to somehow be maintained across http requests, as it needs to be passed in the second server-side http POST to the Access Token URL at https://oauth.intuit.com/oauth/v1/get_access_token. This final step is invoked once the user has authenticated on Intuit's site and authorized the application, and then the user is redirected back to the node application at the callback URL specified as a parameter in the Request Token remote call, in the example app's case, http://localhost:3000/callback. 173 | 174 | ### Configuration 175 | 176 | The Intuit Developer Javascript code contained in `intuit.ejs` is configured with the `grantUrl` option set to "http://localhost:3000/requestToken". You will want to change this to an appropriate URL for your application, but you will need to write similar functionality to that contained in the '/requestToken' route configured in `app.js`, also taking care to configure your `consumerKey` and `consumerSecret` on lines 27-28 in app.js. 177 | 178 | 179 | ## Running the tests 180 | 181 | First you'll need to fill in the missing values in config.js. The consumerKey and consumerSecret you can get from the Intuit Developer portal, the token, tokenSecret, and realmId are easiest to obtain by running the example app, completing the OAuth workflow, and copying the values that are logged to the console. Once you've filled in the missing credentials in config.js you can simply run: 182 | 183 | `npm test` 184 | 185 | 186 | ## Public Api 187 | 188 | QuickBooks(consumerKey, consumerSecret, oauth_token, oauth_token_secret, realmId, debug, minorVer, oAuthVer, refresh_token) 189 | 190 | __Arguments__ 191 | 192 | * `consumerKey` - The application's consumer key 193 | * `consumerSecret` - The application's consumer secret 194 | * `oauth_token` - The user's generated token 195 | * `oauth_token_secret` - The user's generated secret. Set this to false for oAuth 2. 196 | * `realmId` - The company ID 197 | * `useSandbox` - boolean flag to indicate whether to use Sandbox (i.e. for testing) 198 | * `debug` - boolean flag to log http requests, headers, and response bodies to the console 199 | * `minorVer` - Minor version for Intuit's API. Use null if you do not want to specify a version, to use the latest 200 | * `oAuthVer` - Use string '2.0' for oAuth 2 201 | * `refresh_token` - The user's generated refresh token. This is the code query parameter in the oAuth 2.0 callback 202 | 203 | 204 | #### Create 205 | * [`createAccount`](#createaccountobject-callback) 206 | * [`createAttachable`](#createattachableobject-callback) 207 | * [`createBill`](#createbillobject-callback) 208 | * [`createBillPayment`](#createbillpaymentobject-callback) 209 | * [`createClass`](#createclassobject-callback) 210 | * [`createCreditMemo`](#createcreditmemoobject-callback) 211 | * [`createCustomer`](#createcustomerobject-callback) 212 | * [`createDepartment`](#createdepartmentobject-callback) 213 | * [`createDeposit`](#createdepositobject-callback) 214 | * [`createEmployee`](#createemployeeobject-callback) 215 | * [`createEstimate`](#createestimateobject-callback) 216 | * [`createInvoice`](#createinvoiceobject-callback) 217 | * [`createItem`](#createitemobject-callback) 218 | * [`createJournalCode`](#createjournalcodeobject-callback) 219 | * [`createJournalEntry`](#createjournalentryobject-callback) 220 | * [`createPayment`](#createpaymentobject-callback) 221 | * [`createPaymentMethod`](#createpaymentmethodobject-callback) 222 | * [`createPurchase`](#createpurchaseobject-callback) 223 | * [`createPurchaseOrder`](#createpurchaseorderobject-callback) 224 | * [`createRefundReceipt`](#createrefundreceiptobject-callback) 225 | * [`createSalesReceipt`](#createsalesreceiptobject-callback) 226 | * [`createTaxAgency`](#createtaxagencyobject-callback) 227 | * [`createTaxService`](#createtaxserviceobject-callback) 228 | * [`createTerm`](#createtermobject-callback) 229 | * [`createTimeActivity`](#createtimeactivityobject-callback) 230 | * [`createTransfer`](#createtransferobject-callback) 231 | * [`createVendor`](#createvendorobject-callback) 232 | * [`createVendorCredit`](#createvendorcreditobject-callback) 233 | 234 | #### Read 235 | 236 | * [`getAccount`](#getaccountid-callback) 237 | * [`getAttachable`](#getattachableid-callback) 238 | * [`getBill`](#getbillid-callback) 239 | * [`getBillPayment`](#getbillpaymentid-callback) 240 | * [`getClass`](#getclassid-callback) 241 | * [`getCompanyInfo`](#getcompanyinfoid-callback) 242 | * [`getCreditMemo`](#getcreditmemoid-callback) 243 | * [`getCustomer`](#getcustomerid-callback) 244 | * [`getDepartment`](#getdepartmentid-callback) 245 | * [`getDeposit`](#getdepositid-callback) 246 | * [`getEmployee`](#getemployeeid-callback) 247 | * [`getEstimate`](#getestimateid-callback) 248 | * [`getExchangeRate`](#getexchangerateoptions-callback) 249 | * [`getInvoice`](#getinvoiceid-callback) 250 | * [`getItem`](#getitemid-callback) 251 | * [`getJournalCode`](#getjournalcodeid-callback) 252 | * [`getJournalEntry`](#getjournalentryid-callback) 253 | * [`getPayment`](#getpaymentid-callback) 254 | * [`getPaymentMethod`](#getpaymentmethodid-callback) 255 | * [`getPreferences`](#getpreferencesid-callback) 256 | * [`getPurchase`](#getpurchaseid-callback) 257 | * [`getPurchaseOrder`](#getpurchaseorderid-callback) 258 | * [`getRefundReceipt`](#getrefundreceiptid-callback) 259 | * [`getReports`](#getreportsid-callback) 260 | * [`getSalesReceipt`](#getsalesreceiptid-callback) 261 | * [`getTaxAgency`](#gettaxagencyid-callback) 262 | * [`getTaxCode`](#gettaxcodeid-callback) 263 | * [`getTaxRate`](#gettaxrateid-callback) 264 | * [`getTerm`](#gettermid-callback) 265 | * [`getTimeActivity`](#gettimeactivityid-callback) 266 | * [`getVendor`](#getvendorid-callback) 267 | * [`getVendorCredit`](#getvendorcreditid-callback) 268 | 269 | #### Update 270 | 271 | * [`updateAccount`](#updateaccountobject-callback) 272 | * [`updateAttachable`](#updateattachableobject-callback) 273 | * [`updateBill`](#updatebillobject-callback) 274 | * [`updateBillPayment`](#updatebillpaymentobject-callback) 275 | * [`updateClass`](#updateclassobject-callback) 276 | * [`updateCompanyInfo`](#updatecompanyinfoobject-callback) 277 | * [`updateCreditMemo`](#updatecreditmemoobject-callback) 278 | * [`updateCustomer`](#updatecustomerobject-callback) 279 | * [`updateDepartment`](#updatedepartmentobject-callback) 280 | * [`updateDeposit`](#updatedepositobject-callback) 281 | * [`updateEmployee`](#updateemployeeobject-callback) 282 | * [`updateEstimate`](#updateestimateobject-callback) 283 | * [`updateInvoice`](#updateinvoiceobject-callback) 284 | * [`updateItem`](#updateitemobject-callback) 285 | * [`updateJournalCode`](#updatejournalcodeobject-callback) 286 | * [`updateJournalEntry`](#updatejournalentryobject-callback) 287 | * [`updatePayment`](#updatepaymentobject-callback) 288 | * [`updatePaymentMethod`](#updatepaymentmethodobject-callback) 289 | * [`updatePreferences`](#updatepreferencesobject-callback) 290 | * [`updatePurchase`](#updatepurchaseobject-callback) 291 | * [`updatePurchaseOrder`](#updatepurchaseorderobject-callback) 292 | * [`updateRefundReceipt`](#updaterefundreceiptobject-callback) 293 | * [`updateSalesReceipt`](#updatesalesreceiptobject-callback) 294 | * [`updateTaxAgency`](#updatetaxagencyobject-callback) 295 | * [`updateTaxCode`](#updatetaxcodeobject-callback) 296 | * [`updateTaxRate`](#updatetaxrateobject-callback) 297 | * [`updateTerm`](#updatetermobject-callback) 298 | * [`updateTimeActivity`](#updatetimeactivityobject-callback) 299 | * [`updateTransfer`](#updatetransferobject-callback) 300 | * [`updateVendor`](#updatevendorobject-callback) 301 | * [`updateVendorCredit`](#updatevendorcreditobject-callback) 302 | * [`updateExchangeRate`](#updateexchangerateobject-callback) 303 | 304 | #### Delete 305 | 306 | * [`deleteAttachable`](#deleteattachableidorentity-callback) 307 | * [`deleteBill`](#deletebillidorentity-callback) 308 | * [`deleteBillPayment`](#deletebillpaymentidorentity-callback) 309 | * [`deleteCreditMemo`](#deletecreditmemoidorentity-callback) 310 | * [`deleteDeposit`](#deletedepositidorentity-callback) 311 | * [`deleteEstimate`](#deleteestimateidorentity-callback) 312 | * [`deleteInvoice`](#deleteinvoiceidorentity-callback) 313 | * [`deleteJournalCode`](#deletejournalcodeidorentity-callback) 314 | * [`deleteJournalEntry`](#deletejournalentryidorentity-callback) 315 | * [`deletePayment`](#deletepaymentidorentity-callback) 316 | * [`deletePurchase`](#deletepurchaseidorentity-callback) 317 | * [`deletePurchaseOrder`](#deletepurchaseorderidorentity-callback) 318 | * [`deleteRefundReceipt`](#deleterefundreceiptidorentity-callback) 319 | * [`deleteSalesReceipt`](#deletesalesreceiptidorentity-callback) 320 | * [`deleteTimeActivity`](#deletetimeactivityidorentity-callback) 321 | * [`deleteTransfer`](#deletetransferidorentity-callback) 322 | * [`deleteVendorCredit`](#deletevendorcreditidorentity-callback) 323 | 324 | #### Query 325 | 326 | * [`findAccounts`](#findaccountscriteria-callback) 327 | * [`findAttachables`](#findattachablescriteria-callback) 328 | * [`findBills`](#findbillscriteria-callback) 329 | * [`findBillPayments`](#findbillpaymentscriteria-callback) 330 | * [`findBudgets`](#findbudgetscriteria-callback) 331 | * [`findClasses`](#findclassescriteria-callback) 332 | * [`findCompanyInfos`](#findcompanyinfoscriteria-callback) 333 | * [`findCreditMemos`](#findcreditmemoscriteria-callback) 334 | * [`findCustomers`](#findcustomerscriteria-callback) 335 | * [`findDepartments`](#finddepartmentscriteria-callback) 336 | * [`findDeposits`](#finddepositscriteria-callback) 337 | * [`findEmployees`](#findemployeescriteria-callback) 338 | * [`findEstimates`](#findestimatescriteria-callback) 339 | * [`findInvoices`](#findinvoicescriteria-callback) 340 | * [`findItems`](#finditemscriteria-callback) 341 | * [`findJournalCodes`](#findjournalcodescriteria-callback) 342 | * [`findJournalEntries`](#findjournalentriescriteria-callback) 343 | * [`findPayments`](#findpaymentscriteria-callback) 344 | * [`findPaymentMethods`](#findpaymentmethodscriteria-callback) 345 | * [`findPreferenceses`](#findpreferencesescriteria-callback) 346 | * [`findPurchases`](#findpurchasescriteria-callback) 347 | * [`findPurchaseOrders`](#findpurchaseorderscriteria-callback) 348 | * [`findRefundReceipts`](#findrefundreceiptscriteria-callback) 349 | * [`findSalesReceipts`](#findsalesreceiptscriteria-callback) 350 | * [`findTaxAgencies`](#findtaxagenciescriteria-callback) 351 | * [`findTaxCodes`](#findtaxcodescriteria-callback) 352 | * [`findTaxRates`](#findtaxratescriteria-callback) 353 | * [`findTerms`](#findtermscriteria-callback) 354 | * [`findTimeActivities`](#findtimeactivitiescriteria-callback) 355 | * [`findVendors`](#findvendorscriteria-callback) 356 | * [`findVendorCredits`](#findvendorcreditscriteria-callback) 357 | * [`findExchangeRates`](#findexchangeratescriteria-callback) 358 | 359 | #### Reports 360 | 361 | * [`reportBalanceSheet`](#reportbalancesheetoptions-callback) 362 | * [`reportProfitAndLoss`](#reportprofitandlossoptions-callback) 363 | * [`reportProfitAndLossDetail`](#reportprofitandlossdetailoptions-callback) 364 | * [`reportTrialBalance`](#reporttrialbalanceoptions-callback) 365 | * [`reportCashFlow`](#reportcashflowoptions-callback) 366 | * [`reportInventoryValuationSummary`](#reportinventoryvaluationsummaryoptions-callback) 367 | * [`reportCustomerSales`](#reportcustomersalesoptions-callback) 368 | * [`reportItemSales`](#reportitemsalesoptions-callback) 369 | * [`reportCustomerIncome`](#reportcustomerincomeoptions-callback) 370 | * [`reportCustomerBalance`](#reportcustomerbalanceoptions-callback) 371 | * [`reportCustomerBalanceDetail`](#reportcustomerbalancedetailoptions-callback) 372 | * [`reportAgedReceivables`](#reportagedreceivablesoptions-callback) 373 | * [`reportAgedReceivableDetail`](#reportagedreceivabledetailoptions-callback) 374 | * [`reportVendorBalance`](#reportvendorbalanceoptions-callback) 375 | * [`reportVendorBalanceDetail`](#reportvendorbalancedetailoptions-callback) 376 | * [`reportAgedPayables`](#reportagedpayablesoptions-callback) 377 | * [`reportAgedPayableDetail`](#reportagedpayabledetailoptions-callback) 378 | * [`reportVendorExpenses`](#reportvendorexpensesoptions-callback) 379 | * [`reportTransactionList`](#reporttransactionlistoptions-callback) 380 | * [`reportGeneralLedgerDetail`](#reportgeneralledgerdetailoptions-callback) 381 | * [`reportDepartmentSales`](#reportdepartmentsalesoptions-callback) 382 | * [`reportClassSales`](#reportclasssalesoptions-callback) 383 | 384 | 385 | #### SalesReceipt and Invoice PDFs 386 | * [`getInvoicePdf`](#getinvoicepdfid-callback) 387 | * [`getCreditMemoPdf`](#getinvoicepdfid-callback) 388 | * [`getSalesReceiptPdf`](#getsalesreceiptpdfid-callback) 389 | * [`sendInvoicePdf`](#sendinvoicepdfid-sendto-callback) 390 | * [`sendCreditMemoPdf`](#sendcreditmemopdfid-sendto-callback) 391 | * [`sendEstimatePdf`](#sendestimatepdfid-sendto-callback) 392 | * [`sendSalesReceiptPdf`](#sendsalesreceiptpdfid-sendto-callback) 393 | 394 | ### Purchase Order Email 395 | * [`sendPurchaseOrder`](#sendpurchaseorderid-sendto-callback) 396 | 397 | 398 | #### Miscellaneous 399 | * [`batch`](#batchitems-callback) 400 | * [`changeDataCapture`](#changedatacaptureentities-since-callback) 401 | * [`upload`](#uploadstream-entitytype-entityid-callback) 402 | 403 | 404 | #### createAccount(object, callback) 405 | 406 | Creates the Account in QuickBooks 407 | 408 | __Arguments__ 409 | 410 | * `object` - The unsaved account, to be persisted in QuickBooks 411 | * `callback` - Callback function which is called with any error and the persistent Account 412 | 413 | 414 | #### createAttachable(object, callback) 415 | 416 | Creates the Attachable in QuickBooks 417 | 418 | __Arguments__ 419 | 420 | * `object` - The unsaved attachable, to be persisted in QuickBooks 421 | * `callback` - Callback function which is called with any error and the persistent Attachable 422 | 423 | 424 | #### createBill(object, callback) 425 | 426 | Creates the Bill in QuickBooks 427 | 428 | __Arguments__ 429 | 430 | * `object` - The unsaved bill, to be persisted in QuickBooks 431 | * `callback` - Callback function which is called with any error and the persistent Bill 432 | 433 | 434 | #### createBillPayment(object, callback) 435 | 436 | Creates the BillPayment in QuickBooks 437 | 438 | __Arguments__ 439 | 440 | * `object` - The unsaved billPayment, to be persisted in QuickBooks 441 | * `callback` - Callback function which is called with any error and the persistent BillPayment 442 | 443 | 444 | #### createClass(object, callback) 445 | 446 | Creates the Class in QuickBooks 447 | 448 | __Arguments__ 449 | 450 | * `object` - The unsaved class, to be persisted in QuickBooks 451 | * `callback` - Callback function which is called with any error and the persistent Class 452 | 453 | 454 | #### createCreditMemo(object, callback) 455 | 456 | Creates the CreditMemo in QuickBooks 457 | 458 | __Arguments__ 459 | 460 | * `object` - The unsaved creditMemo, to be persisted in QuickBooks 461 | * `callback` - Callback function which is called with any error and the persistent CreditMemo 462 | 463 | 464 | #### createCustomer(object, callback) 465 | 466 | Creates the Customer in QuickBooks 467 | 468 | __Arguments__ 469 | 470 | * `object` - The unsaved customer, to be persisted in QuickBooks 471 | * `callback` - Callback function which is called with any error and the persistent Customer 472 | 473 | 474 | #### createDepartment(object, callback) 475 | 476 | Creates the Department in QuickBooks 477 | 478 | __Arguments__ 479 | 480 | * `object` - The unsaved department, to be persisted in QuickBooks 481 | * `callback` - Callback function which is called with any error and the persistent Department 482 | 483 | 484 | #### createDeposit(object, callback) 485 | 486 | Creates the Deposit in QuickBooks 487 | 488 | __Arguments__ 489 | 490 | * `object` - The unsaved deposit, to be persisted in QuickBooks 491 | * `callback` - Callback function which is called with any error and the persistent Deposit 492 | 493 | 494 | #### createEmployee(object, callback) 495 | 496 | Creates the Employee in QuickBooks 497 | 498 | __Arguments__ 499 | 500 | * `object` - The unsaved employee, to be persisted in QuickBooks 501 | * `callback` - Callback function which is called with any error and the persistent Employee 502 | 503 | 504 | #### createEstimate(object, callback) 505 | 506 | Creates the Estimate in QuickBooks 507 | 508 | __Arguments__ 509 | 510 | * `object` - The unsaved estimate, to be persisted in QuickBooks 511 | * `callback` - Callback function which is called with any error and the persistent Estimate 512 | 513 | 514 | #### createInvoice(object, callback) 515 | 516 | Creates the Invoice in QuickBooks 517 | 518 | __Arguments__ 519 | 520 | * `object` - The unsaved invoice, to be persisted in QuickBooks 521 | * `callback` - Callback function which is called with any error and the persistent Invoice 522 | 523 | 524 | #### createItem(object, callback) 525 | 526 | Creates the Item in QuickBooks 527 | 528 | __Arguments__ 529 | 530 | * `object` - The unsaved item, to be persisted in QuickBooks 531 | * `callback` - Callback function which is called with any error and the persistent Item 532 | 533 | 534 | #### createJournalCode(object, callback) 535 | 536 | Creates the JournalCode in QuickBooks 537 | 538 | __Arguments__ 539 | 540 | * `object` - The unsaved journalCode, to be persisted in QuickBooks 541 | * `callback` - Callback function which is called with any error and the persistent JournalCode 542 | 543 | 544 | #### createJournalEntry(object, callback) 545 | 546 | Creates the JournalEntry in QuickBooks 547 | 548 | __Arguments__ 549 | 550 | * `object` - The unsaved journalEntry, to be persisted in QuickBooks 551 | * `callback` - Callback function which is called with any error and the persistent JournalEntry 552 | 553 | 554 | #### createPayment(object, callback) 555 | 556 | Creates the Payment in QuickBooks 557 | 558 | __Arguments__ 559 | 560 | * `object` - The unsaved payment, to be persisted in QuickBooks 561 | * `callback` - Callback function which is called with any error and the persistent Payment 562 | 563 | 564 | #### createPaymentMethod(object, callback) 565 | 566 | Creates the PaymentMethod in QuickBooks 567 | 568 | __Arguments__ 569 | 570 | * `object` - The unsaved paymentMethod, to be persisted in QuickBooks 571 | * `callback` - Callback function which is called with any error and the persistent PaymentMethod 572 | 573 | 574 | #### createPurchase(object, callback) 575 | 576 | Creates the Purchase in QuickBooks 577 | 578 | __Arguments__ 579 | 580 | * `object` - The unsaved purchase, to be persisted in QuickBooks 581 | * `callback` - Callback function which is called with any error and the persistent Purchase 582 | 583 | 584 | #### createPurchaseOrder(object, callback) 585 | 586 | Creates the PurchaseOrder in QuickBooks 587 | 588 | __Arguments__ 589 | 590 | * `object` - The unsaved purchaseOrder, to be persisted in QuickBooks 591 | * `callback` - Callback function which is called with any error and the persistent PurchaseOrder 592 | 593 | 594 | #### createRefundReceipt(object, callback) 595 | 596 | Creates the RefundReceipt in QuickBooks 597 | 598 | __Arguments__ 599 | 600 | * `object` - The unsaved refundReceipt, to be persisted in QuickBooks 601 | * `callback` - Callback function which is called with any error and the persistent RefundReceipt 602 | 603 | 604 | #### createSalesReceipt(object, callback) 605 | 606 | Creates the SalesReceipt in QuickBooks 607 | 608 | __Arguments__ 609 | 610 | * `object` - The unsaved salesReceipt, to be persisted in QuickBooks 611 | * `callback` - Callback function which is called with any error and the persistent SalesReceipt 612 | 613 | 614 | #### createTaxAgency(object, callback) 615 | 616 | Creates the TaxAgency in QuickBooks 617 | 618 | __Arguments__ 619 | 620 | * `object` - The unsaved taxAgency, to be persisted in QuickBooks 621 | * `callback` - Callback function which is called with any error and the persistent TaxAgency 622 | 623 | 624 | #### createTaxService(object, callback) 625 | 626 | Creates the TaxService in QuickBooks 627 | 628 | __Arguments__ 629 | 630 | * `object` - The unsaved taxService, to be persisted in QuickBooks 631 | * `callback` - Callback function which is called with any error and the persistent TaxService 632 | 633 | 634 | #### createTerm(object, callback) 635 | 636 | Creates the Term in QuickBooks 637 | 638 | __Arguments__ 639 | 640 | * `object` - The unsaved term, to be persisted in QuickBooks 641 | * `callback` - Callback function which is called with any error and the persistent Term 642 | 643 | 644 | #### createTimeActivity(object, callback) 645 | 646 | Creates the TimeActivity in QuickBooks 647 | 648 | __Arguments__ 649 | 650 | * `object` - The unsaved timeActivity, to be persisted in QuickBooks 651 | * `callback` - Callback function which is called with any error and the persistent TimeActivity 652 | 653 | 654 | #### createTransfer(object, callback) 655 | 656 | Creates the Transfer in QuickBooks 657 | 658 | __Arguments__ 659 | 660 | * `object` - The unsaved transfer, to be persisted in QuickBooks 661 | * `callback` - Callback function which is called with any error and the persistent Transfer 662 | 663 | 664 | #### createVendor(object, callback) 665 | 666 | Creates the Vendor in QuickBooks 667 | 668 | __Arguments__ 669 | 670 | * `object` - The unsaved vendor, to be persisted in QuickBooks 671 | * `callback` - Callback function which is called with any error and the persistent Vendor 672 | 673 | 674 | #### createVendorCredit(object, callback) 675 | 676 | Creates the VendorCredit in QuickBooks 677 | 678 | __Arguments__ 679 | 680 | * `object` - The unsaved vendorCredit, to be persisted in QuickBooks 681 | * `callback` - Callback function which is called with any error and the persistent VendorCredit 682 | 683 | 684 | 685 | 686 | #### getAccount(id, callback) 687 | 688 | Retrieves the Account from QuickBooks 689 | 690 | __Arguments__ 691 | 692 | * `id` - The Id of persistent Account 693 | * `callback` - Callback function which is called with any error and the persistent Account 694 | 695 | 696 | #### getAttachable(id, callback) 697 | 698 | Retrieves the Attachable from QuickBooks 699 | 700 | __Arguments__ 701 | 702 | * `id` - The Id of persistent Attachable 703 | * `callback` - Callback function which is called with any error and the persistent Attachable 704 | 705 | 706 | #### getBill(id, callback) 707 | 708 | Retrieves the Bill from QuickBooks 709 | 710 | __Arguments__ 711 | 712 | * `id` - The Id of persistent Bill 713 | * `callback` - Callback function which is called with any error and the persistent Bill 714 | 715 | 716 | #### getBillPayment(id, callback) 717 | 718 | Retrieves the BillPayment from QuickBooks 719 | 720 | __Arguments__ 721 | 722 | * `id` - The Id of persistent BillPayment 723 | * `callback` - Callback function which is called with any error and the persistent BillPayment 724 | 725 | 726 | #### getClass(id, callback) 727 | 728 | Retrieves the Class from QuickBooks 729 | 730 | __Arguments__ 731 | 732 | * `id` - The Id of persistent Class 733 | * `callback` - Callback function which is called with any error and the persistent Class 734 | 735 | 736 | #### getCompanyInfo(id, callback) 737 | 738 | Retrieves the CompanyInfo from QuickBooks 739 | 740 | __Arguments__ 741 | 742 | * `id` - The Id of persistent CompanyInfo 743 | * `callback` - Callback function which is called with any error and the persistent CompanyInfo 744 | 745 | 746 | #### getCreditMemo(id, callback) 747 | 748 | Retrieves the CreditMemo from QuickBooks 749 | 750 | __Arguments__ 751 | 752 | * `id` - The Id of persistent CreditMemo 753 | * `callback` - Callback function which is called with any error and the persistent CreditMemo 754 | 755 | 756 | #### getCustomer(id, callback) 757 | 758 | Retrieves the Customer from QuickBooks 759 | 760 | __Arguments__ 761 | 762 | * `id` - The Id of persistent Customer 763 | * `callback` - Callback function which is called with any error and the persistent Customer 764 | 765 | 766 | #### getDepartment(id, callback) 767 | 768 | Retrieves the Department from QuickBooks 769 | 770 | __Arguments__ 771 | 772 | * `id` - The Id of persistent Department 773 | * `callback` - Callback function which is called with any error and the persistent Department 774 | 775 | 776 | #### getDeposit(id, callback) 777 | 778 | Retrieves the Deposit from QuickBooks 779 | 780 | __Arguments__ 781 | 782 | * `id` - The Id of persistent Deposit 783 | * `callback` - Callback function which is called with any error and the persistent Deposit 784 | 785 | 786 | #### getEmployee(id, callback) 787 | 788 | Retrieves the Employee from QuickBooks 789 | 790 | __Arguments__ 791 | 792 | * `id` - The Id of persistent Employee 793 | * `callback` - Callback function which is called with any error and the persistent Employee 794 | 795 | 796 | #### getEstimate(id, callback) 797 | 798 | Retrieves the Estimate from QuickBooks 799 | 800 | __Arguments__ 801 | 802 | * `id` - The Id of persistent Estimate 803 | * `callback` - Callback function which is called with any error and the persistent Estimate 804 | 805 | 806 | #### getExchangeRate(options, callback) 807 | 808 | Retrieves an ExchangeRate from QuickBooks 809 | 810 | __Arguments__ 811 | 812 | * `options` - An object with options including the required `sourcecurrencycode` parameter and optional `asofdate` parameter. 813 | * `callback` - Callback function which is called with any error and the ExchangeRate 814 | 815 | 816 | #### getInvoice(id, callback) 817 | 818 | Retrieves the Invoice from QuickBooks 819 | 820 | __Arguments__ 821 | 822 | * `id` - The Id of persistent Invoice 823 | * `callback` - Callback function which is called with any error and the persistent Invoice 824 | 825 | 826 | #### getItem(id, callback) 827 | 828 | Retrieves the Item from QuickBooks 829 | 830 | __Arguments__ 831 | 832 | * `id` - The Id of persistent Item 833 | * `callback` - Callback function which is called with any error and the persistent Item 834 | 835 | 836 | #### getJournalCode(id, callback) 837 | 838 | Retrieves the JournalCode from QuickBooks 839 | 840 | __Arguments__ 841 | 842 | * `id` - The Id of persistent JournalCode 843 | * `callback` - Callback function which is called with any error and the persistent JournalCode 844 | 845 | 846 | #### getJournalEntry(id, callback) 847 | 848 | Retrieves the JournalEntry from QuickBooks 849 | 850 | __Arguments__ 851 | 852 | * `id` - The Id of persistent JournalEntry 853 | * `callback` - Callback function which is called with any error and the persistent JournalEntry 854 | 855 | 856 | #### getPayment(id, callback) 857 | 858 | Retrieves the Payment from QuickBooks 859 | 860 | __Arguments__ 861 | 862 | * `id` - The Id of persistent Payment 863 | * `callback` - Callback function which is called with any error and the persistent Payment 864 | 865 | 866 | #### getPaymentMethod(id, callback) 867 | 868 | Retrieves the PaymentMethod from QuickBooks 869 | 870 | __Arguments__ 871 | 872 | * `id` - The Id of persistent PaymentMethod 873 | * `callback` - Callback function which is called with any error and the persistent PaymentMethod 874 | 875 | 876 | #### getPreferences(callback) 877 | 878 | Retrieves the Preferences from QuickBooks 879 | 880 | __Arguments__ 881 | 882 | * `callback` - Callback function which is called with any error and the Preferences of the authorised realm 883 | 884 | 885 | #### getPurchase(id, callback) 886 | 887 | Retrieves the Purchase from QuickBooks 888 | 889 | __Arguments__ 890 | 891 | * `id` - The Id of persistent Purchase 892 | * `callback` - Callback function which is called with any error and the persistent Purchase 893 | 894 | 895 | #### getPurchaseOrder(id, callback) 896 | 897 | Retrieves the PurchaseOrder from QuickBooks 898 | 899 | __Arguments__ 900 | 901 | * `id` - The Id of persistent PurchaseOrder 902 | * `callback` - Callback function which is called with any error and the persistent PurchaseOrder 903 | 904 | 905 | #### getRefundReceipt(id, callback) 906 | 907 | Retrieves the RefundReceipt from QuickBooks 908 | 909 | __Arguments__ 910 | 911 | * `id` - The Id of persistent RefundReceipt 912 | * `callback` - Callback function which is called with any error and the persistent RefundReceipt 913 | 914 | 915 | #### getReports(id, callback) 916 | 917 | Retrieves the Reports from QuickBooks 918 | 919 | __Arguments__ 920 | 921 | * `id` - The Id of persistent Reports 922 | * `callback` - Callback function which is called with any error and the persistent Reports 923 | 924 | 925 | #### getSalesReceipt(id, callback) 926 | 927 | Retrieves the SalesReceipt from QuickBooks 928 | 929 | __Arguments__ 930 | 931 | * `id` - The Id of persistent SalesReceipt 932 | * `callback` - Callback function which is called with any error and the persistent SalesReceipt 933 | 934 | 935 | #### getTaxAgency(id, callback) 936 | 937 | Retrieves the TaxAgency from QuickBooks 938 | 939 | __Arguments__ 940 | 941 | * `id` - The Id of persistent TaxAgency 942 | * `callback` - Callback function which is called with any error and the persistent TaxAgency 943 | 944 | 945 | #### getTaxCode(id, callback) 946 | 947 | Retrieves the TaxCode from QuickBooks 948 | 949 | __Arguments__ 950 | 951 | * `id` - The Id of persistent TaxCode 952 | * `callback` - Callback function which is called with any error and the persistent TaxCode 953 | 954 | 955 | #### getTaxRate(id, callback) 956 | 957 | Retrieves the TaxRate from QuickBooks 958 | 959 | __Arguments__ 960 | 961 | * `id` - The Id of persistent TaxRate 962 | * `callback` - Callback function which is called with any error and the persistent TaxRate 963 | 964 | 965 | #### getTerm(id, callback) 966 | 967 | Retrieves the Term from QuickBooks 968 | 969 | __Arguments__ 970 | 971 | * `id` - The Id of persistent Term 972 | * `callback` - Callback function which is called with any error and the persistent Term 973 | 974 | 975 | #### getTimeActivity(id, callback) 976 | 977 | Retrieves the TimeActivity from QuickBooks 978 | 979 | __Arguments__ 980 | 981 | * `id` - The Id of persistent TimeActivity 982 | * `callback` - Callback function which is called with any error and the persistent TimeActivity 983 | 984 | 985 | #### getTransfer(id, callback) 986 | 987 | Retrieves the Transfer from QuickBooks 988 | 989 | __Arguments__ 990 | 991 | * `id` - The Id of persistent Transfer 992 | * `callback` - Callback function which is called with any error and the persistent Transfer 993 | 994 | 995 | #### getVendor(id, callback) 996 | 997 | Retrieves the Vendor from QuickBooks 998 | 999 | __Arguments__ 1000 | 1001 | * `id` - The Id of persistent Vendor 1002 | * `callback` - Callback function which is called with any error and the persistent Vendor 1003 | 1004 | 1005 | #### getVendorCredit(id, callback) 1006 | 1007 | Retrieves the VendorCredit from QuickBooks 1008 | 1009 | __Arguments__ 1010 | 1011 | * `id` - The Id of persistent VendorCredit 1012 | * `callback` - Callback function which is called with any error and the persistent VendorCredit 1013 | 1014 | 1015 | 1016 | 1017 | #### updateAccount(object, callback) 1018 | 1019 | Updates QuickBooks version of Account 1020 | 1021 | __Arguments__ 1022 | 1023 | * `object` - The persistent Account, including Id and SyncToken fields 1024 | * `callback` - Callback function which is called with any error and the updated Account 1025 | 1026 | 1027 | #### updateAttachable(object, callback) 1028 | 1029 | Updates QuickBooks version of Attachable 1030 | 1031 | __Arguments__ 1032 | 1033 | * `object` - The persistent Attachable, including Id and SyncToken fields 1034 | * `callback` - Callback function which is called with any error and the updated Attachable 1035 | 1036 | 1037 | #### updateBill(object, callback) 1038 | 1039 | Updates QuickBooks version of Bill 1040 | 1041 | __Arguments__ 1042 | 1043 | * `object` - The persistent Bill, including Id and SyncToken fields 1044 | * `callback` - Callback function which is called with any error and the updated Bill 1045 | 1046 | 1047 | #### updateBillPayment(object, callback) 1048 | 1049 | Updates QuickBooks version of BillPayment 1050 | 1051 | __Arguments__ 1052 | 1053 | * `object` - The persistent BillPayment, including Id and SyncToken fields 1054 | * `callback` - Callback function which is called with any error and the updated BillPayment 1055 | 1056 | 1057 | #### updateClass(object, callback) 1058 | 1059 | Updates QuickBooks version of Class 1060 | 1061 | __Arguments__ 1062 | 1063 | * `object` - The persistent Class, including Id and SyncToken fields 1064 | * `callback` - Callback function which is called with any error and the updated Class 1065 | 1066 | 1067 | #### updateCompanyInfo(object, callback) 1068 | 1069 | Updates QuickBooks version of CompanyInfo 1070 | 1071 | __Arguments__ 1072 | 1073 | * `object` - The persistent CompanyInfo, including Id and SyncToken fields 1074 | * `callback` - Callback function which is called with any error and the updated CompanyInfo 1075 | 1076 | 1077 | #### updateCreditMemo(object, callback) 1078 | 1079 | Updates QuickBooks version of CreditMemo 1080 | 1081 | __Arguments__ 1082 | 1083 | * `object` - The persistent CreditMemo, including Id and SyncToken fields 1084 | * `callback` - Callback function which is called with any error and the updated CreditMemo 1085 | 1086 | 1087 | #### updateCustomer(object, callback) 1088 | 1089 | Updates QuickBooks version of Customer 1090 | 1091 | __Arguments__ 1092 | 1093 | * `object` - The persistent Customer, including Id and SyncToken fields 1094 | * `callback` - Callback function which is called with any error and the updated Customer 1095 | 1096 | 1097 | #### updateDepartment(object, callback) 1098 | 1099 | Updates QuickBooks version of Department 1100 | 1101 | __Arguments__ 1102 | 1103 | * `object` - The persistent Department, including Id and SyncToken fields 1104 | * `callback` - Callback function which is called with any error and the updated Department 1105 | 1106 | 1107 | #### updateDeposit(object, callback) 1108 | 1109 | Updates QuickBooks version of Deposit 1110 | 1111 | __Arguments__ 1112 | 1113 | * `object` - The persistent Deposit, including Id and SyncToken fields 1114 | * `callback` - Callback function which is called with any error and the updated Deposit 1115 | 1116 | 1117 | #### updateEmployee(object, callback) 1118 | 1119 | Updates QuickBooks version of Employee 1120 | 1121 | __Arguments__ 1122 | 1123 | * `object` - The persistent Employee, including Id and SyncToken fields 1124 | * `callback` - Callback function which is called with any error and the updated Employee 1125 | 1126 | 1127 | #### updateEstimate(object, callback) 1128 | 1129 | Updates QuickBooks version of Estimate 1130 | 1131 | __Arguments__ 1132 | 1133 | * `object` - The persistent Estimate, including Id and SyncToken fields 1134 | * `callback` - Callback function which is called with any error and the updated Estimate 1135 | 1136 | 1137 | #### updateInvoice(object, callback) 1138 | 1139 | Updates QuickBooks version of Invoice 1140 | 1141 | __Arguments__ 1142 | 1143 | * `object` - The persistent Invoice, including Id and SyncToken fields. To void invoice set `void:true` in the object. 1144 | * `callback` - Callback function which is called with any error and the updated Invoice 1145 | 1146 | 1147 | #### updateItem(object, callback) 1148 | 1149 | Updates QuickBooks version of Item 1150 | 1151 | __Arguments__ 1152 | 1153 | * `object` - The persistent Item, including Id and SyncToken fields 1154 | * `doNotUpdateAccountOnTxns` - _(bool)_ Optional property on the Item object that supresses updating the income or expense account on any existing transactions associated with this Item object. Value is compared using .toString(), so `true`/`false` must be used (vs other truthy/falsy values like 0 or 1). 1155 | * `callback` - Callback function which is called with any error and the updated Item 1156 | 1157 | 1158 | #### updateJournalCode(object, callback) 1159 | 1160 | Updates QuickBooks version of JournalCode 1161 | 1162 | __Arguments__ 1163 | 1164 | * `object` - The persistent JournalCode, including Id and SyncToken fields 1165 | * `callback` - Callback function which is called with any error and the updated JournalCode 1166 | 1167 | 1168 | #### updateJournalEntry(object, callback) 1169 | 1170 | Updates QuickBooks version of JournalEntry 1171 | 1172 | __Arguments__ 1173 | 1174 | * `object` - The persistent JournalEntry, including Id and SyncToken fields 1175 | * `callback` - Callback function which is called with any error and the updated JournalEntry 1176 | 1177 | 1178 | #### updatePayment(object, callback) 1179 | 1180 | Updates QuickBooks version of Payment 1181 | 1182 | __Arguments__ 1183 | 1184 | * `object` - The persistent Payment, including Id and SyncToken fields. To void payment set `void:true` in the object. 1185 | * `callback` - Callback function which is called with any error and the updated Payment 1186 | 1187 | 1188 | #### updatePaymentMethod(object, callback) 1189 | 1190 | Updates QuickBooks version of PaymentMethod 1191 | 1192 | __Arguments__ 1193 | 1194 | * `object` - The persistent PaymentMethod, including Id and SyncToken fields 1195 | * `callback` - Callback function which is called with any error and the updated PaymentMethod 1196 | 1197 | 1198 | #### updatePreferences(object, callback) 1199 | 1200 | Updates QuickBooks version of Preferences 1201 | 1202 | __Arguments__ 1203 | 1204 | * `object` - The persistent Preferences, including Id and SyncToken fields 1205 | * `callback` - Callback function which is called with any error and the updated Preferences 1206 | 1207 | 1208 | #### updatePurchase(object, callback) 1209 | 1210 | Updates QuickBooks version of Purchase 1211 | 1212 | __Arguments__ 1213 | 1214 | * `object` - The persistent Purchase, including Id and SyncToken fields 1215 | * `callback` - Callback function which is called with any error and the updated Purchase 1216 | 1217 | 1218 | #### updatePurchaseOrder(object, callback) 1219 | 1220 | Updates QuickBooks version of PurchaseOrder 1221 | 1222 | __Arguments__ 1223 | 1224 | * `object` - The persistent PurchaseOrder, including Id and SyncToken fields 1225 | * `callback` - Callback function which is called with any error and the updated PurchaseOrder 1226 | 1227 | 1228 | #### updateRefundReceipt(object, callback) 1229 | 1230 | Updates QuickBooks version of RefundReceipt 1231 | 1232 | __Arguments__ 1233 | 1234 | * `object` - The persistent RefundReceipt, including Id and SyncToken fields 1235 | * `callback` - Callback function which is called with any error and the updated RefundReceipt 1236 | 1237 | 1238 | #### updateSalesReceipt(object, callback) 1239 | 1240 | Updates QuickBooks version of SalesReceipt 1241 | 1242 | __Arguments__ 1243 | 1244 | * `object` - The persistent SalesReceipt, including Id and SyncToken fields. To void sales receipt set `void:true` in the object. 1245 | * `callback` - Callback function which is called with any error and the updated SalesReceipt 1246 | 1247 | 1248 | #### updateTaxAgency(object, callback) 1249 | 1250 | Updates QuickBooks version of TaxAgency 1251 | 1252 | __Arguments__ 1253 | 1254 | * `object` - The persistent TaxAgency, including Id and SyncToken fields 1255 | * `callback` - Callback function which is called with any error and the updated TaxAgency 1256 | 1257 | 1258 | #### updateTaxCode(object, callback) 1259 | 1260 | Updates QuickBooks version of TaxCode 1261 | 1262 | __Arguments__ 1263 | 1264 | * `object` - The persistent TaxCode, including Id and SyncToken fields 1265 | * `callback` - Callback function which is called with any error and the updated TaxCode 1266 | 1267 | 1268 | #### updateTaxRate(object, callback) 1269 | 1270 | Updates QuickBooks version of TaxRate 1271 | 1272 | __Arguments__ 1273 | 1274 | * `object` - The persistent TaxRate, including Id and SyncToken fields 1275 | * `callback` - Callback function which is called with any error and the updated TaxRate 1276 | 1277 | 1278 | #### updateTerm(object, callback) 1279 | 1280 | Updates QuickBooks version of Term 1281 | 1282 | __Arguments__ 1283 | 1284 | * `object` - The persistent Term, including Id and SyncToken fields 1285 | * `callback` - Callback function which is called with any error and the updated Term 1286 | 1287 | 1288 | #### updateTimeActivity(object, callback) 1289 | 1290 | Updates QuickBooks version of TimeActivity 1291 | 1292 | __Arguments__ 1293 | 1294 | * `object` - The persistent TimeActivity, including Id and SyncToken fields 1295 | * `callback` - Callback function which is called with any error and the updated TimeActivity 1296 | 1297 | 1298 | #### updateTransfer(object, callback) 1299 | 1300 | Updates QuickBooks version of Transfer 1301 | 1302 | __Arguments__ 1303 | 1304 | * `object` - The persistent Transfer, including Id and SyncToken fields 1305 | * `callback` - Callback function which is called with any error and the updated Transfer 1306 | 1307 | 1308 | #### updateVendor(object, callback) 1309 | 1310 | Updates QuickBooks version of Vendor 1311 | 1312 | __Arguments__ 1313 | 1314 | * `object` - The persistent Vendor, including Id and SyncToken fields 1315 | * `callback` - Callback function which is called with any error and the updated Vendor 1316 | 1317 | 1318 | #### updateVendorCredit(object, callback) 1319 | 1320 | Updates QuickBooks version of VendorCredit 1321 | 1322 | __Arguments__ 1323 | 1324 | * `object` - The persistent VendorCredit, including Id and SyncToken fields 1325 | * `callback` - Callback function which is called with any error and the updated VendorCredit 1326 | 1327 | 1328 | #### updateExchangeRate(object, callback) 1329 | 1330 | Updates QuickBooks version of ExchangeRate 1331 | 1332 | __Arguments__ 1333 | 1334 | * `object` - The persistent ExchangeRate 1335 | * `callback` - Callback function which is called with any error and the updated ExchangeRate 1336 | 1337 | 1338 | 1339 | 1340 | #### deleteAttachable(idOrEntity, callback) 1341 | 1342 | Deletes the Attachable from QuickBooks 1343 | 1344 | __Arguments__ 1345 | 1346 | * `idOrEntity` - The 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 1347 | * `callback` - Callback function which is called with any error and the status of the persistent Attachable 1348 | 1349 | 1350 | #### deleteBill(idOrEntity, callback) 1351 | 1352 | Deletes the Bill from QuickBooks 1353 | 1354 | __Arguments__ 1355 | 1356 | * `idOrEntity` - The 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 1357 | * `callback` - Callback function which is called with any error and the status of the persistent Bill 1358 | 1359 | 1360 | #### deleteBillPayment(idOrEntity, callback) 1361 | 1362 | Deletes the BillPayment from QuickBooks 1363 | 1364 | __Arguments__ 1365 | 1366 | * `idOrEntity` - The 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 1367 | * `callback` - Callback function which is called with any error and the status of the persistent BillPayment 1368 | 1369 | 1370 | #### deleteCreditMemo(idOrEntity, callback) 1371 | 1372 | Deletes the CreditMemo from QuickBooks 1373 | 1374 | __Arguments__ 1375 | 1376 | * `idOrEntity` - The 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 1377 | * `callback` - Callback function which is called with any error and the status of the persistent CreditMemo 1378 | 1379 | 1380 | #### deleteDeposit(idOrEntity, callback) 1381 | 1382 | Deletes the Deposit from QuickBooks 1383 | 1384 | __Arguments__ 1385 | 1386 | * `idOrEntity` - The 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 1387 | * `callback` - Callback function which is called with any error and the status of the persistent Deposit 1388 | 1389 | 1390 | #### deleteEstimate(idOrEntity, callback) 1391 | 1392 | Deletes the Estimate from QuickBooks 1393 | 1394 | __Arguments__ 1395 | 1396 | * `idOrEntity` - The 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 1397 | * `callback` - Callback function which is called with any error and the status of the persistent Estimate 1398 | 1399 | 1400 | #### deleteInvoice(idOrEntity, callback) 1401 | 1402 | Deletes the Invoice from QuickBooks 1403 | 1404 | __Arguments__ 1405 | 1406 | * `idOrEntity` - The 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 1407 | * `callback` - Callback function which is called with any error and the status of the persistent Invoice 1408 | 1409 | 1410 | #### deleteJournalCode(idOrEntity, callback) 1411 | 1412 | Deletes the JournalCode from QuickBooks 1413 | 1414 | __Arguments__ 1415 | 1416 | * `idOrEntity` - The 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 1417 | * `callback` - Callback function which is called with any error and the status of the persistent JournalCode 1418 | 1419 | 1420 | #### deleteJournalEntry(idOrEntity, callback) 1421 | 1422 | Deletes the JournalEntry from QuickBooks 1423 | 1424 | __Arguments__ 1425 | 1426 | * `idOrEntity` - The 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 1427 | * `callback` - Callback function which is called with any error and the status of the persistent JournalEntry 1428 | 1429 | 1430 | #### deletePayment(idOrEntity, callback) 1431 | 1432 | Deletes the Payment from QuickBooks 1433 | 1434 | __Arguments__ 1435 | 1436 | * `idOrEntity` - The 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 1437 | * `callback` - Callback function which is called with any error and the status of the persistent Payment 1438 | 1439 | 1440 | #### deletePurchase(idOrEntity, callback) 1441 | 1442 | Deletes the Purchase from QuickBooks 1443 | 1444 | __Arguments__ 1445 | 1446 | * `idOrEntity` - The 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 1447 | * `callback` - Callback function which is called with any error and the status of the persistent Purchase 1448 | 1449 | 1450 | #### deletePurchaseOrder(idOrEntity, callback) 1451 | 1452 | Deletes the PurchaseOrder from QuickBooks 1453 | 1454 | __Arguments__ 1455 | 1456 | * `idOrEntity` - The 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 1457 | * `callback` - Callback function which is called with any error and the status of the persistent PurchaseOrder 1458 | 1459 | 1460 | #### deleteRefundReceipt(idOrEntity, callback) 1461 | 1462 | Deletes the RefundReceipt from QuickBooks 1463 | 1464 | __Arguments__ 1465 | 1466 | * `idOrEntity` - The 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 1467 | * `callback` - Callback function which is called with any error and the status of the persistent RefundReceipt 1468 | 1469 | 1470 | #### deleteSalesReceipt(idOrEntity, callback) 1471 | 1472 | Deletes the SalesReceipt from QuickBooks 1473 | 1474 | __Arguments__ 1475 | 1476 | * `idOrEntity` - The 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 1477 | * `callback` - Callback function which is called with any error and the status of the persistent SalesReceipt 1478 | 1479 | 1480 | #### deleteTimeActivity(idOrEntity, callback) 1481 | 1482 | Deletes the TimeActivity from QuickBooks 1483 | 1484 | __Arguments__ 1485 | 1486 | * `idOrEntity` - The 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 1487 | * `callback` - Callback function which is called with any error and the status of the persistent TimeActivity 1488 | 1489 | 1490 | #### deleteTransfer(idOrEntity, callback) 1491 | 1492 | Deletes the Transfer from QuickBooks 1493 | 1494 | __Arguments__ 1495 | 1496 | * `idOrEntity` - The 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 1497 | * `callback` - Callback function which is called with any error and the status of the persistent Transfer 1498 | 1499 | 1500 | #### deleteVendorCredit(idOrEntity, callback) 1501 | 1502 | Deletes the VendorCredit from QuickBooks 1503 | 1504 | __Arguments__ 1505 | 1506 | * `idOrEntity` - The 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 1507 | * `callback` - Callback function which is called with any error and the status of the persistent VendorCredit 1508 | 1509 | 1510 | 1511 | 1512 | #### findAccounts(criteria, callback) 1513 | 1514 | Finds all Accounts in QuickBooks, optionally matching the specified criteria 1515 | 1516 | __Arguments__ 1517 | 1518 | * `criteria` - (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'" 1519 | * `callback` - Callback function which is called with any error and the list of Accounts 1520 | 1521 | 1522 | #### findAttachables(criteria, callback) 1523 | 1524 | Finds all Attachables in QuickBooks, optionally matching the specified criteria 1525 | 1526 | __Arguments__ 1527 | 1528 | * `criteria` - (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'" 1529 | * `callback` - Callback function which is called with any error and the list of Attachables 1530 | 1531 | 1532 | #### findBills(criteria, callback) 1533 | 1534 | Finds all Bills in QuickBooks, optionally matching the specified criteria 1535 | 1536 | __Arguments__ 1537 | 1538 | * `criteria` - (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'" 1539 | * `callback` - Callback function which is called with any error and the list of Bills 1540 | 1541 | 1542 | #### findBillPayments(criteria, callback) 1543 | 1544 | Finds all BillPayments in QuickBooks, optionally matching the specified criteria 1545 | 1546 | __Arguments__ 1547 | 1548 | * `criteria` - (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'" 1549 | * `callback` - Callback function which is called with any error and the list of BillPayments 1550 | 1551 | 1552 | #### findBudgets(criteria, callback) 1553 | 1554 | Finds all Budgets in QuickBooks, optionally matching the specified criteria 1555 | 1556 | __Arguments__ 1557 | 1558 | * `criteria` - (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'" 1559 | * `callback` - Callback function which is called with any error and the list of Budgets 1560 | 1561 | 1562 | #### findClasses(criteria, callback) 1563 | 1564 | Finds all Classs in QuickBooks, optionally matching the specified criteria 1565 | 1566 | __Arguments__ 1567 | 1568 | * `criteria` - (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'" 1569 | * `callback` - Callback function which is called with any error and the list of Classes 1570 | 1571 | 1572 | #### findCompanyInfos(criteria, callback) 1573 | 1574 | Finds all CompanyInfos in QuickBooks, optionally matching the specified criteria 1575 | 1576 | __Arguments__ 1577 | 1578 | * `criteria` - (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'" 1579 | * `callback` - Callback function which is called with any error and the list of CompanyInfos 1580 | 1581 | 1582 | #### findCreditMemos(criteria, callback) 1583 | 1584 | Finds all CreditMemos in QuickBooks, optionally matching the specified criteria 1585 | 1586 | __Arguments__ 1587 | 1588 | * `criteria` - (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'" 1589 | * `callback` - Callback function which is called with any error and the list of CreditMemos 1590 | 1591 | 1592 | #### findCustomers(criteria, callback) 1593 | 1594 | Finds all Customers in QuickBooks, optionally matching the specified criteria 1595 | 1596 | __Arguments__ 1597 | 1598 | * `criteria` - (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'" 1599 | * `callback` - Callback function which is called with any error and the list of Customers 1600 | 1601 | 1602 | #### findDepartments(criteria, callback) 1603 | 1604 | Finds all Departments in QuickBooks, optionally matching the specified criteria 1605 | 1606 | __Arguments__ 1607 | 1608 | * `criteria` - (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'" 1609 | * `callback` - Callback function which is called with any error and the list of Departments 1610 | 1611 | 1612 | #### findDeposits(criteria, callback) 1613 | 1614 | Finds all Deposits in QuickBooks, optionally matching the specified criteria 1615 | 1616 | __Arguments__ 1617 | 1618 | * `criteria` - (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'" 1619 | * `callback` - Callback function which is called with any error and the list of Deposits 1620 | 1621 | 1622 | #### findEmployees(criteria, callback) 1623 | 1624 | Finds all Employees in QuickBooks, optionally matching the specified criteria 1625 | 1626 | __Arguments__ 1627 | 1628 | * `criteria` - (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'" 1629 | * `callback` - Callback function which is called with any error and the list of Employees 1630 | 1631 | 1632 | #### findEstimates(criteria, callback) 1633 | 1634 | Finds all Estimates in QuickBooks, optionally matching the specified criteria 1635 | 1636 | __Arguments__ 1637 | 1638 | * `criteria` - (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'" 1639 | * `callback` - Callback function which is called with any error and the list of Estimates 1640 | 1641 | 1642 | #### findInvoices(criteria, callback) 1643 | 1644 | Finds all Invoices in QuickBooks, optionally matching the specified criteria 1645 | 1646 | __Arguments__ 1647 | 1648 | * `criteria` - (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'" 1649 | * `callback` - Callback function which is called with any error and the list of Invoices 1650 | 1651 | 1652 | #### findItems(criteria, callback) 1653 | 1654 | Finds all Items in QuickBooks, optionally matching the specified criteria 1655 | 1656 | __Arguments__ 1657 | 1658 | * `criteria` - (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'" 1659 | * `callback` - Callback function which is called with any error and the list of Items 1660 | 1661 | 1662 | #### findJournalCodes(criteria, callback) 1663 | 1664 | Finds all JournalCodes in QuickBooks, optionally matching the specified criteria 1665 | 1666 | __Arguments__ 1667 | 1668 | * `criteria` - (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'" 1669 | * `callback` - Callback function which is called with any error and the list of JournalCodes 1670 | 1671 | 1672 | #### findJournalEntries(criteria, callback) 1673 | 1674 | Finds all JournalEntrys in QuickBooks, optionally matching the specified criteria 1675 | 1676 | __Arguments__ 1677 | 1678 | * `criteria` - (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'" 1679 | * `callback` - Callback function which is called with any error and the list of JournalEntries 1680 | 1681 | 1682 | #### findPayments(criteria, callback) 1683 | 1684 | Finds all Payments in QuickBooks, optionally matching the specified criteria 1685 | 1686 | __Arguments__ 1687 | 1688 | * `criteria` - (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'" 1689 | * `callback` - Callback function which is called with any error and the list of Payments 1690 | 1691 | 1692 | #### findPaymentMethods(criteria, callback) 1693 | 1694 | Finds all PaymentMethods in QuickBooks, optionally matching the specified criteria 1695 | 1696 | __Arguments__ 1697 | 1698 | * `criteria` - (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'" 1699 | * `callback` - Callback function which is called with any error and the list of PaymentMethods 1700 | 1701 | 1702 | #### findPreferenceses(criteria, callback) 1703 | 1704 | Finds all Preferencess in QuickBooks, optionally matching the specified criteria 1705 | 1706 | __Arguments__ 1707 | 1708 | * `criteria` - (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'" 1709 | * `callback` - Callback function which is called with any error and the list of Preferences 1710 | 1711 | 1712 | #### findPurchases(criteria, callback) 1713 | 1714 | Finds all Purchases in QuickBooks, optionally matching the specified criteria 1715 | 1716 | __Arguments__ 1717 | 1718 | * `criteria` - (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'" 1719 | * `callback` - Callback function which is called with any error and the list of Purchases 1720 | 1721 | 1722 | #### findPurchaseOrders(criteria, callback) 1723 | 1724 | Finds all PurchaseOrders in QuickBooks, optionally matching the specified criteria 1725 | 1726 | __Arguments__ 1727 | 1728 | * `criteria` - (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'" 1729 | * `callback` - Callback function which is called with any error and the list of PurchaseOrders 1730 | 1731 | 1732 | #### findRefundReceipts(criteria, callback) 1733 | 1734 | Finds all RefundReceipts in QuickBooks, optionally matching the specified criteria 1735 | 1736 | __Arguments__ 1737 | 1738 | * `criteria` - (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'" 1739 | * `callback` - Callback function which is called with any error and the list of RefundReceipts 1740 | 1741 | 1742 | #### findSalesReceipts(criteria, callback) 1743 | 1744 | Finds all SalesReceipts in QuickBooks, optionally matching the specified criteria 1745 | 1746 | __Arguments__ 1747 | 1748 | * `criteria` - (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'" 1749 | * `callback` - Callback function which is called with any error and the list of SalesReceipts 1750 | 1751 | 1752 | #### findTaxAgencies(criteria, callback) 1753 | 1754 | Finds all TaxAgencys in QuickBooks, optionally matching the specified criteria 1755 | 1756 | __Arguments__ 1757 | 1758 | * `criteria` - (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'" 1759 | * `callback` - Callback function which is called with any error and the list of TaxAgencies 1760 | 1761 | 1762 | #### findTaxCodes(criteria, callback) 1763 | 1764 | Finds all TaxCodes in QuickBooks, optionally matching the specified criteria 1765 | 1766 | __Arguments__ 1767 | 1768 | * `criteria` - (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'" 1769 | * `callback` - Callback function which is called with any error and the list of TaxCodes 1770 | 1771 | 1772 | #### findTaxRates(criteria, callback) 1773 | 1774 | Finds all TaxRates in QuickBooks, optionally matching the specified criteria 1775 | 1776 | __Arguments__ 1777 | 1778 | * `criteria` - (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'" 1779 | * `callback` - Callback function which is called with any error and the list of TaxRates 1780 | 1781 | 1782 | #### findTerms(criteria, callback) 1783 | 1784 | Finds all Terms in QuickBooks, optionally matching the specified criteria 1785 | 1786 | __Arguments__ 1787 | 1788 | * `criteria` - (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'" 1789 | * `callback` - Callback function which is called with any error and the list of Terms 1790 | 1791 | 1792 | #### findTimeActivities(criteria, callback) 1793 | 1794 | Finds all TimeActivitys in QuickBooks, optionally matching the specified criteria 1795 | 1796 | __Arguments__ 1797 | 1798 | * `criteria` - (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'" 1799 | * `callback` - Callback function which is called with any error and the list of TimeActivities 1800 | 1801 | 1802 | #### findVendors(criteria, callback) 1803 | 1804 | Finds all Vendors in QuickBooks, optionally matching the specified criteria 1805 | 1806 | __Arguments__ 1807 | 1808 | * `criteria` - (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'" 1809 | * `callback` - Callback function which is called with any error and the list of Vendors 1810 | 1811 | 1812 | #### findVendorCredits(criteria, callback) 1813 | 1814 | Finds all VendorCredits in QuickBooks, optionally matching the specified criteria 1815 | 1816 | __Arguments__ 1817 | 1818 | * `criteria` - (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'" 1819 | * `callback` - Callback function which is called with any error and the list of VendorCredits 1820 | 1821 | 1822 | #### findExchangeRates(criteria, callback) 1823 | 1824 | Finds all ExchangeRates in QuickBooks, optionally matching the specified criteria 1825 | 1826 | __Arguments__ 1827 | 1828 | * `criteria` - (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'" 1829 | * `callback` - Callback function which is called with any error and the list of ExchangeRates 1830 | 1831 | 1832 | 1833 | #### reportBalanceSheet(options, callback) 1834 | 1835 | Retrieves the BalanceSheet Report from QuickBooks 1836 | 1837 | __Arguments__ 1838 | 1839 | * `options` - (Optional) Map of key-value pairs passed as options to the Report 1840 | * `callback` - Callback function which is called with any error and the BalanceSheet Report 1841 | 1842 | 1843 | #### reportProfitAndLoss(options, callback) 1844 | 1845 | Retrieves the ProfitAndLoss Report from QuickBooks 1846 | 1847 | __Arguments__ 1848 | 1849 | * `options` - (Optional) Map of key-value pairs passed as options to the Report 1850 | * `callback` - Callback function which is called with any error and the ProfitAndLoss Report 1851 | 1852 | 1853 | #### reportProfitAndLossDetail(options, callback) 1854 | 1855 | Retrieves the ProfitAndLossDetail Report from QuickBooks 1856 | 1857 | __Arguments__ 1858 | 1859 | * `options` - (Optional) Map of key-value pairs passed as options to the Report 1860 | * `callback` - Callback function which is called with any error and the ProfitAndLossDetail Report 1861 | 1862 | 1863 | #### reportTrialBalance(options, callback) 1864 | 1865 | Retrieves the TrialBalance Report from QuickBooks 1866 | 1867 | __Arguments__ 1868 | 1869 | * `options` - (Optional) Map of key-value pairs passed as options to the Report 1870 | * `callback` - Callback function which is called with any error and the TrialBalance Report 1871 | 1872 | 1873 | #### reportCashFlow(options, callback) 1874 | 1875 | Retrieves the CashFlow Report from QuickBooks 1876 | 1877 | __Arguments__ 1878 | 1879 | * `options` - (Optional) Map of key-value pairs passed as options to the Report 1880 | * `callback` - Callback function which is called with any error and the CashFlow Report 1881 | 1882 | 1883 | #### reportInventoryValuationSummary(options, callback) 1884 | 1885 | Retrieves the InventoryValuationSummary Report from QuickBooks 1886 | 1887 | __Arguments__ 1888 | 1889 | * `options` - (Optional) Map of key-value pairs passed as options to the Report 1890 | * `callback` - Callback function which is called with any error and the InventoryValuationSummary Report 1891 | 1892 | 1893 | #### reportCustomerSales(options, callback) 1894 | 1895 | Retrieves the CustomerSales Report from QuickBooks 1896 | 1897 | __Arguments__ 1898 | 1899 | * `options` - (Optional) Map of key-value pairs passed as options to the Report 1900 | * `callback` - Callback function which is called with any error and the CustomerSales Report 1901 | 1902 | 1903 | #### reportItemSales(options, callback) 1904 | 1905 | Retrieves the ItemSales Report from QuickBooks 1906 | 1907 | __Arguments__ 1908 | 1909 | * `options` - (Optional) Map of key-value pairs passed as options to the Report 1910 | * `callback` - Callback function which is called with any error and the ItemSales Report 1911 | 1912 | 1913 | #### reportCustomerIncome(options, callback) 1914 | 1915 | Retrieves the CustomerIncome Report from QuickBooks 1916 | 1917 | __Arguments__ 1918 | 1919 | * `options` - (Optional) Map of key-value pairs passed as options to the Report 1920 | * `callback` - Callback function which is called with any error and the CustomerIncome Report 1921 | 1922 | 1923 | #### reportCustomerBalance(options, callback) 1924 | 1925 | Retrieves the CustomerBalance Report from QuickBooks 1926 | 1927 | __Arguments__ 1928 | 1929 | * `options` - (Optional) Map of key-value pairs passed as options to the Report 1930 | * `callback` - Callback function which is called with any error and the CustomerBalance Report 1931 | 1932 | 1933 | #### reportCustomerBalanceDetail(options, callback) 1934 | 1935 | Retrieves the CustomerBalanceDetail Report from QuickBooks 1936 | 1937 | __Arguments__ 1938 | 1939 | * `options` - (Optional) Map of key-value pairs passed as options to the Report 1940 | * `callback` - Callback function which is called with any error and the CustomerBalanceDetail Report 1941 | 1942 | 1943 | #### reportAgedReceivables(options, callback) 1944 | 1945 | Retrieves the AgedReceivables Report from QuickBooks 1946 | 1947 | __Arguments__ 1948 | 1949 | * `options` - (Optional) Map of key-value pairs passed as options to the Report 1950 | * `callback` - Callback function which is called with any error and the AgedReceivables Report 1951 | 1952 | 1953 | #### reportAgedReceivableDetail(options, callback) 1954 | 1955 | Retrieves the AgedReceivableDetail Report from QuickBooks 1956 | 1957 | __Arguments__ 1958 | 1959 | * `options` - (Optional) Map of key-value pairs passed as options to the Report 1960 | * `callback` - Callback function which is called with any error and the AgedReceivableDetail Report 1961 | 1962 | 1963 | #### reportVendorBalance(options, callback) 1964 | 1965 | Retrieves the VendorBalance Report from QuickBooks 1966 | 1967 | __Arguments__ 1968 | 1969 | * `options` - (Optional) Map of key-value pairs passed as options to the Report 1970 | * `callback` - Callback function which is called with any error and the VendorBalance Report 1971 | 1972 | 1973 | #### reportVendorBalanceDetail(options, callback) 1974 | 1975 | Retrieves the VendorBalanceDetail Report from QuickBooks 1976 | 1977 | __Arguments__ 1978 | 1979 | * `options` - (Optional) Map of key-value pairs passed as options to the Report 1980 | * `callback` - Callback function which is called with any error and the VendorBalanceDetail Report 1981 | 1982 | 1983 | #### reportAgedPayables(options, callback) 1984 | 1985 | Retrieves the AgedPayables Report from QuickBooks 1986 | 1987 | __Arguments__ 1988 | 1989 | * `options` - (Optional) Map of key-value pairs passed as options to the Report 1990 | * `callback` - Callback function which is called with any error and the AgedPayables Report 1991 | 1992 | 1993 | #### reportAgedPayableDetail(options, callback) 1994 | 1995 | Retrieves the AgedPayableDetail Report from QuickBooks 1996 | 1997 | __Arguments__ 1998 | 1999 | * `options` - (Optional) Map of key-value pairs passed as options to the Report 2000 | * `callback` - Callback function which is called with any error and the AgedPayableDetail Report 2001 | 2002 | 2003 | #### reportVendorExpenses(options, callback) 2004 | 2005 | Retrieves the VendorExpenses Report from QuickBooks 2006 | 2007 | __Arguments__ 2008 | 2009 | * `options` - (Optional) Map of key-value pairs passed as options to the Report 2010 | * `callback` - Callback function which is called with any error and the VendorExpenses Report 2011 | 2012 | 2013 | #### reportTransactionList(options, callback) 2014 | 2015 | Retrieves the TransactionList Report from QuickBooks 2016 | 2017 | __Arguments__ 2018 | 2019 | * `options` - (Optional) Map of key-value pairs passed as options to the Report 2020 | * `callback` - Callback function which is called with any error and the TransactionList Report 2021 | 2022 | 2023 | #### reportGeneralLedgerDetail(options, callback) 2024 | 2025 | Retrieves the GeneralLedgerDetail Report from QuickBooks 2026 | 2027 | __Arguments__ 2028 | 2029 | * `options` - (Optional) Map of key-value pairs passed as options to the Report 2030 | * `callback` - Callback function which is called with any error and the GeneralLedgerDetail Report 2031 | 2032 | 2033 | #### reportDepartmentSales(options, callback) 2034 | 2035 | Retrieves the DepartmentSales Report from QuickBooks 2036 | 2037 | __Arguments__ 2038 | 2039 | * `options` - (Optional) Map of key-value pairs passed as options to the Report 2040 | * `callback` - Callback function which is called with any error and the DepartmentSales Report 2041 | 2042 | 2043 | #### reportClassSales(options, callback) 2044 | 2045 | Retrieves the ClassSales Report from QuickBooks 2046 | 2047 | __Arguments__ 2048 | 2049 | * `options` - (Optional) Map of key-value pairs passed as options to the Report 2050 | * `callback` - Callback function which is called with any error and the ClassSales Report 2051 | 2052 | 2053 | #### getInvoicePdf(id, callback) 2054 | 2055 | Retrieves the Invoice PDF from QuickBooks 2056 | 2057 | __Arguments__ 2058 | 2059 | * `id` - The Id of persistent Invoice 2060 | * `callback` - Callback function which is called with any error and the Invoice PDF 2061 | 2062 | #### getCreditMemoPdf(id, callback) 2063 | 2064 | Retrieves the Credit Memo PDF from QuickBooks 2065 | 2066 | __Arguments__ 2067 | 2068 | * `id` - The Id of persistent Credit Memo 2069 | * `callback` - Callback function which is called with any error and the Credit Memo PDF 2070 | 2071 | #### getSalesReceiptPdf(id, callback) 2072 | 2073 | Retrieves the SalesReceipt PDF from QuickBooks 2074 | 2075 | __Arguments__ 2076 | 2077 | * `id` - The Id of persistent SalesReceipt 2078 | * `callback` - Callback function which is called with any error and the persistent SalesReceipt PDF 2079 | 2080 | #### sendInvoicePdf(id, sendTo, callback) 2081 | 2082 | Emails the Invoice PDF from QuickBooks to the address supplied in Invoice.BillEmail.EmailAddress or the specified 'sendTo' address 2083 | 2084 | __Arguments__ 2085 | 2086 | * `Id` - The Id of persistent Invoice 2087 | * `sendTo` - (Optional) optional email address to send the PDF to. If not provided, address supplied in Invoice.BillEmail.EmailAddress will be used 2088 | * `callback` - Callback function which is called with any error and the Invoice PDF 2089 | 2090 | #### sendCreditMemoPdf(id, sendTo, callback) 2091 | 2092 | Emails the Credit Memo PDF from QuickBooks to the address supplied in CreditMemo.BillEmail.EmailAddress or the specified 'sendTo' address 2093 | 2094 | __Arguments__ 2095 | 2096 | * `Id` - The Id of persistent Credit Memo 2097 | * `sendTo` - (Optional) optional email address to send the PDF to. If not provided, address supplied in Credit Memo.BillEmail.EmailAddress will be used 2098 | * `callback` - Callback function which is called with any error and the Credit Memo PDF 2099 | 2100 | #### sendEstimatePdf(id, sendTo, callback) 2101 | 2102 | Emails the Estimate PDF from QuickBooks to the address supplied in Estimate.BillEmail.EmailAddress or the specified 'sendTo' address 2103 | 2104 | __Arguments__ 2105 | 2106 | * `Id` - The Id of persistent Estimate 2107 | * `sendTo` - (Optional) optional email address to send the PDF to. If not provided, address supplied in Estimate.BillEmail.EmailAddress will be used 2108 | * `callback` - Callback function which is called with any error and the Estimate PDF 2109 | 2110 | 2111 | #### sendSalesReceiptPdf(id, sendTo, callback) 2112 | 2113 | Emails the SalesReceipt PDF from QuickBooks to the address supplied in SalesReceipt.BillEmail.EmailAddress or the specified 'sendTo' address 2114 | 2115 | __Arguments__ 2116 | 2117 | * `Id` - The Id of persistent SalesReceipt 2118 | * `sendTo` - (Optional) optional email address to send the PDF to. If not provided, address supplied in SalesReceipt.BillEmail.EmailAddress will be used 2119 | * `callback` - Callback function which is called with any error and the SalesReceipt PDF 2120 | 2121 | #### sendPurchaseOrder(id, sendTo, callback) 2122 | 2123 | Emails the Purchase Order from QuickBooks to the address supplied in PurchaseOrder.POEmail.Address or the specified 'sendTo' address 2124 | 2125 | __Arguments__ 2126 | 2127 | * `Id` - The Id of persistent Purchase Order 2128 | * `sendTo` - (Optional) optional email address to send the email to. If not provided, address supplied in PurchaseOrder.POEmail.Address will be used 2129 | * `callback` - Callback function which is called with any error and the PurchaseOrder PDF 2130 | 2131 | #### batch(items, callback) 2132 | 2133 | Batch operation to enable an application to perform multiple operations in a single request. The following batch items are supported: 2134 | - create 2135 | - update 2136 | - delete 2137 | - query 2138 | 2139 | * The maximum number of batch items in a single request is 30. 2140 | 2141 | __Arguments__ 2142 | 2143 | * `items` - JavaScript array of batch items 2144 | * `callback` - Callback function which is called with any error and list of BatchItemResponses 2145 | 2146 | 2147 | #### changeDataCapture(entities, since, callback) 2148 | 2149 | The change data capture (CDC) operation returns a list of entities that have changed since a specified time. 2150 | 2151 | __Arguments__ 2152 | 2153 | * `entities` - Comma separated list or JavaScript array of entities to search for changes 2154 | * `since` - JavaScript Date or string representation of the form '2012-07-20T22:25:51-07:00' to look back for changes until 2155 | * `callback` - Callback function which is called with any error and list of changes 2156 | 2157 | 2158 | #### upload(filename, contentType, stream, entityType, entityId, callback) 2159 | 2160 | Uploads a file as an Attachable in QBO, optionally linking it to the specified QBO Entity. 2161 | 2162 | __Arguments__ 2163 | 2164 | * `filename` - the name of the file 2165 | * `contentType` - the mime type of the file 2166 | * `stream` - ReadableStream of file contents 2167 | * `entityType` - optional string name of the QBO entity the Attachable will be linked to (e.g. Invoice) 2168 | * `entityId` - optional Id of the QBO entity the Attachable will be linked to 2169 | * `callback` - callback which receives the newly created Attachable 2170 | -------------------------------------------------------------------------------- /build/create.txt: -------------------------------------------------------------------------------- 1 | account 2 | attachable 3 | bill 4 | billPayment 5 | class 6 | creditMemo 7 | customer 8 | department 9 | employee 10 | estimate 11 | invoice 12 | item 13 | journalEntry 14 | payment 15 | paymentMethod 16 | purchase 17 | purchaseOrder 18 | refundReceipt 19 | salesReceipt 20 | taxAgency 21 | taxService 22 | term 23 | timeActivity 24 | vendor 25 | vendorCredit -------------------------------------------------------------------------------- /build/delete.txt: -------------------------------------------------------------------------------- 1 | attachable 2 | bill 3 | billPayment 4 | creditMemo 5 | estimate 6 | invoice 7 | journalEntry 8 | payment 9 | purchase 10 | purchaseOrder 11 | refundReceipt 12 | salesReceipt 13 | timeActivity 14 | vendorCredit -------------------------------------------------------------------------------- /build/generator/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | /classes 3 | /checkouts 4 | pom.xml 5 | pom.xml.asc 6 | *.jar 7 | *.class 8 | /.lein-* 9 | /.nrepl-port 10 | -------------------------------------------------------------------------------- /build/generator/project.clj: -------------------------------------------------------------------------------- 1 | (defproject generator "0.1.0-SNAPSHOT" 2 | :description "FIXME: write description" 3 | :url "http://example.com/FIXME" 4 | :license {:name "Eclipse Public License" 5 | :url "http://www.eclipse.org/legal/epl-v10.html"} 6 | :dependencies [[org.clojure/clojure "1.5.1"]]) 7 | -------------------------------------------------------------------------------- /build/generator/src/generator/core.clj: -------------------------------------------------------------------------------- 1 | (ns generator.core) 2 | 3 | (defn upper [e] 4 | (str (.toUpperCase (.substring e 0 1)) 5 | (.substring e 1))) 6 | 7 | (defn pluralize [s] 8 | (if (.endsWith s "s") 9 | (str s "es") 10 | (if (.endsWith s "y") 11 | (str (.substring s 0 (- (.length s) 1)) "ies") 12 | (str s "s")))) 13 | 14 | (defn create [e] 15 | (str "/** 16 | * Creates the " (upper e) " in QuickBooks 17 | * 18 | * @param {object} " e " - The unsaved " e ", to be persisted in QuickBooks 19 | * @param {function} callback - Callback function which is called with any error and the persistent " (upper e) " 20 | */\n" 21 | "QuickBooks.prototype.create" (upper e) " = function(" (.trim e) ", callback) { 22 | module.create(this, '" (.trim e) "', " (.trim e) ", callback)\n}\n\n")) 23 | 24 | (defn retrieve [e] 25 | (str "/** 26 | * Retrieves the " (upper e) " from QuickBooks 27 | * 28 | * @param {string} Id - The Id of persistent " (upper e) " 29 | * @param {function} callback - Callback function which is called with any error and the persistent " (upper e) " 30 | */\n" 31 | "QuickBooks.prototype.get" (upper e) " = function(id, callback) { 32 | module.read(this, '" (.trim e) "', id, callback)\n}\n\n")) 33 | 34 | (defn update [e] 35 | (str "/** 36 | * Updates QuickBooks version of " (upper e) " 37 | * 38 | * @param {object} " e " - The persistent " (upper e) ", including Id and SyncToken fields 39 | * @param {function} callback - Callback function which is called with any error and the persistent " (upper e) " 40 | */\n" 41 | "QuickBooks.prototype.update" (upper e) " = function(" (.trim e) ", callback) { 42 | module.update(this, '" (.trim e) "', " (.trim e) ", callback)\n}\n\n")) 43 | 44 | (defn delete [e] 45 | (str "/** 46 | * Deletes the " (upper e) " from QuickBooks 47 | * 48 | * @param {object} idOrEntity - The persistent " (upper e) " to be deleted, or the Id of the " (upper e) ", in which case an extra GET request will be issued to first retrieve the " (upper e) " 49 | * @param {function} callback - Callback function which is called with any error and the status of the persistent " (upper e) " 50 | */\n" 51 | "QuickBooks.prototype.delete" (upper e) " = function(idOrEntity, callback) { 52 | module.delete(this, '" (.trim e) "', idOrEntity, callback)\n}\n\n")) 53 | 54 | (defn query [e] 55 | (str "/** 56 | * Finds all " (upper e) "s in QuickBooks, optionally matching the specified criteria 57 | * 58 | * @param {object} criteria - (Optional) String or single-valued map converted to a where clause of the form \"where key = 'value'\" 59 | * @param {function} callback - Callback function which is called with any error and the list of " (upper e) " 60 | */\n" 61 | "QuickBooks.prototype.find" (pluralize (upper e)) " = function(criteria, callback) { 62 | module.query(this, '" (.trim e) "', criteria, callback)\n}\n\n")) 63 | 64 | (defn report [e] 65 | (str "/** 66 | * Retrieves the " (upper e) " Report from QuickBooks 67 | * 68 | * @param {object} options - (Optional) Map of key-value pairs passed as options to the Report 69 | * @param {function} callback - Callback function which is called with any error and the " (upper e) " Report 70 | */\n" 71 | "QuickBooks.prototype.report" (upper e) " = function(options, callback) { 72 | module.report(this, '" (.trim e) "', options, callback)\n}\n\n")) 73 | 74 | 75 | (defn gh-link-create [e] (str "* [`create" (upper e) "`](#create" (upper e) ")\n" )) 76 | (defn gh-create [e] 77 | (str " 78 | #### create" (upper e) "(object, callback) 79 | 80 | Creates the " (upper e) " in QuickBooks 81 | 82 | __Arguments__ 83 | 84 | * `object` - The unsaved " e ", to be persisted in QuickBooks 85 | * `callback` - Callback function which is called with any error and the persistent " (upper e) "\n\n\n")) 86 | 87 | 88 | (defn gh-link-retrieve [e] (str "* [`get" (upper e) "`](#get" (upper e) ")\n" )) 89 | (defn gh-retrieve [e] 90 | (str " 91 | #### get" (upper e) "(id, callback) 92 | 93 | Retrieves the " (upper e) " from QuickBooks 94 | 95 | __Arguments__ 96 | 97 | * `id` - The Id of persistent " (upper e) " 98 | * `callback` - Callback function which is called with any error and the persistent " (upper e) "\n\n\n")) 99 | 100 | 101 | (defn gh-link-update [e] (str "* [`update" (upper e) "`](#update" (upper e) ")\n" )) 102 | (defn gh-update [e] 103 | (str " 104 | #### update" (upper e) "(object, callback) 105 | 106 | Updates QuickBooks version of " (upper e) " 107 | 108 | __Arguments__ 109 | 110 | * `object` - The persistent " (upper e) ", including Id and SyncToken fields 111 | * `callback` - Callback function which is called with any error and the updated " (upper e) "\n\n\n")) 112 | 113 | 114 | (defn gh-link-delete [e] (str "* [`delete" (upper e) "`](#delete" (upper e) ")\n" )) 115 | (defn gh-delete [e] 116 | (str " 117 | #### delete" (upper e) "(idOrEntity, callback) 118 | 119 | Deletes the " (upper e) " from QuickBooks 120 | 121 | __Arguments__ 122 | 123 | * `idOrEntity` - The persistent " (upper e) " to be deleted, or the Id of the " (upper e) ", in which case an extra GET request will be issued to first retrieve the " (upper e) " 124 | * `callback` - Callback function which is called with any error and the status of the persistent " (upper e) "\n\n\n")) 125 | 126 | 127 | (defn gh-link-query [e] (str "* [`find" (pluralize (upper e)) "`](#find" (pluralize (upper e)) ")\n" )) 128 | (defn gh-query [e] 129 | (str " 130 | #### find" (pluralize (upper e)) "(criteria, callback) 131 | 132 | Finds all " (upper e) "s in QuickBooks, optionally matching the specified criteria 133 | 134 | __Arguments__ 135 | 136 | * `criteria` - (Optional) String or single-valued map converted to a where clause of the form \"where key = 'value'\" 137 | * `callback` - Callback function which is called with any error and the list of " (upper e) "\n\n\n")) 138 | 139 | 140 | (defn gh-link-report [e] (str "* [`report" (upper e) "`](#report" (upper e) ")\n" )) 141 | (defn gh-report [e] 142 | (str " 143 | #### report" (upper e) "(options, callback) 144 | 145 | Retrieves the " (upper e) " Report from QuickBooks 146 | 147 | __Arguments__ 148 | 149 | * `options` - (Optional) Map of key-value pairs passed as options to the Report 150 | * `callback` - Callback function which is called with any error and the " (upper e) " Report\n\n\n")) 151 | 152 | 153 | (defn write [buffer type] 154 | (->> (reduce 155 | (fn [m e] 156 | (let [nmsp (-> "generator.core" symbol find-ns) 157 | func (->> type name (str "") symbol (ns-resolve nmsp)) 158 | funk (->> type name (str "gh-link-") symbol (ns-resolve nmsp))] 159 | (if-not (or (empty? e) (.startsWith e "#")) 160 | (do (.append (first m) (func e)) 161 | (.append (last m) (funk e)))) 162 | m)) 163 | buffer 164 | (.split (slurp (str "../" (name type) ".txt")) "\n")) 165 | .toString)) 166 | 167 | (defn generate [] 168 | (->> (reduce 169 | (fn [buffer type] 170 | (write buffer type) 171 | (.append (first buffer) "\n\n") 172 | buffer) 173 | [(StringBuffer.) (StringBuffer.)] 174 | [:create :retrieve :update :delete :query :report]) 175 | first 176 | .toString 177 | (spit (str "../generated.txt")))) 178 | -------------------------------------------------------------------------------- /build/query.txt: -------------------------------------------------------------------------------- 1 | account 2 | attachable 3 | bill 4 | billPayment 5 | budget 6 | class 7 | companyInfo 8 | creditMemo 9 | customer 10 | department 11 | employee 12 | estimate 13 | exchangeRate 14 | invoice 15 | item 16 | journalEntry 17 | payment 18 | paymentMethod 19 | preferences 20 | purchase 21 | purchaseOrder 22 | refundReceipt 23 | salesReceipt 24 | taxAgency 25 | taxCode 26 | taxRate 27 | term 28 | timeActivity 29 | vendor 30 | vendorCredit 31 | -------------------------------------------------------------------------------- /build/report.txt: -------------------------------------------------------------------------------- 1 | BalanceSheet 2 | ProfitAndLoss 3 | ProfitAndLossDetail 4 | TrialBalance 5 | CashFlow 6 | InventoryValuationSummary 7 | CustomerSales 8 | ItemSales 9 | CustomerIncome 10 | CustomerBalance 11 | CustomerBalanceDetail 12 | AgedReceivables 13 | AgedReceivableDetail 14 | VendorBalance 15 | VendorBalanceDetail 16 | AgedPayables 17 | AgedPayableDetail 18 | VendorExpenses 19 | TransactionList 20 | 21 | # these are broken on QBO right now 22 | GeneralLedgerDetail 23 | DepartmentSales 24 | ClassSales -------------------------------------------------------------------------------- /build/retrieve.txt: -------------------------------------------------------------------------------- 1 | account 2 | attachable 3 | bill 4 | billPayment 5 | class 6 | companyInfo 7 | creditMemo 8 | customer 9 | department 10 | employee 11 | estimate 12 | exchangerate 13 | invoice 14 | item 15 | journalEntry 16 | payment 17 | paymentMethod 18 | preferences 19 | purchase 20 | purchaseOrder 21 | refundReceipt 22 | reports 23 | salesReceipt 24 | taxAgency 25 | taxCode 26 | taxRate 27 | term 28 | timeActivity 29 | vendor 30 | vendorCredit -------------------------------------------------------------------------------- /build/update.txt: -------------------------------------------------------------------------------- 1 | account 2 | attachable 3 | bill 4 | billPayment 5 | class 6 | companyInfo 7 | creditMemo 8 | customer 9 | department 10 | employee 11 | estimate 12 | exchangerate 13 | invoice 14 | item 15 | journalEntry 16 | payment 17 | paymentMethod 18 | preferences 19 | purchase 20 | purchaseOrder 21 | refundReceipt 22 | salesReceipt 23 | taxAgency 24 | taxCode 25 | taxRate 26 | taxService 27 | term 28 | timeActivity 29 | vendor 30 | vendorCredit -------------------------------------------------------------------------------- /config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | consumerKey: '', 3 | consumerSecret: '', 4 | token: '', 5 | tokenSecret: '', 6 | realmId: '', 7 | useSandbox: true, 8 | debug: false, 9 | // 10 | // Set useSandbox to false when moving to production. For info, see the following url: 11 | // https://developer.intuit.com/v2/blog/2014/10/24/intuit-developer-now-offers-quickbooks-sandboxes 12 | 13 | testEmail: '', // Use this email address for testing send*Pdf functions 14 | minorversion: '' // Use to set minorversion for request 15 | } 16 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /example/app.js: -------------------------------------------------------------------------------- 1 | var http = require('http'), 2 | port = process.env.PORT || 3000, 3 | request = require('request'), 4 | qs = require('querystring'), 5 | util = require('util'), 6 | bodyParser = require('body-parser'), 7 | cookieParser = require('cookie-parser'), 8 | session = require('express-session'), 9 | express = require('express'), 10 | app = express(), 11 | QuickBooks = require('../index') 12 | 13 | 14 | // Generic Express config 15 | app.set('port', port) 16 | app.set('views', 'views') 17 | app.use(bodyParser.json()); 18 | app.use(bodyParser.urlencoded({extended: true})) 19 | app.use(cookieParser('brad')) 20 | app.use(session({resave: false, saveUninitialized: false, secret: 'smith'})); 21 | 22 | app.listen(app.get('port'), function() { 23 | console.log('Express server listening on port ' + app.get('port')) 24 | }) 25 | 26 | // INSERT YOUR CONSUMER_KEY AND CONSUMER_SECRET HERE 27 | 28 | var consumerKey = '', 29 | consumerSecret = '' 30 | 31 | app.get('/',function(req,res){ 32 | res.redirect('/start'); 33 | }) 34 | 35 | app.get('/start', function(req, res) { 36 | res.render('intuit.ejs', {port:port, appCenter: QuickBooks.APP_CENTER_BASE}) 37 | }) 38 | 39 | app.get('/requestToken', function(req, res) { 40 | var postBody = { 41 | url: QuickBooks.REQUEST_TOKEN_URL, 42 | oauth: { 43 | callback: 'http://localhost:' + port + '/callback/', 44 | consumer_key: consumerKey, 45 | consumer_secret: consumerSecret 46 | } 47 | } 48 | request.post(postBody, function (e, r, data) { 49 | var requestToken = qs.parse(data) 50 | req.session.oauth_token_secret = requestToken.oauth_token_secret 51 | console.log(requestToken) 52 | res.redirect(QuickBooks.APP_CENTER_URL + requestToken.oauth_token) 53 | }) 54 | }) 55 | 56 | app.get('/callback', function(req, res) { 57 | var postBody = { 58 | url: QuickBooks.ACCESS_TOKEN_URL, 59 | oauth: { 60 | consumer_key: consumerKey, 61 | consumer_secret: consumerSecret, 62 | token: req.query.oauth_token, 63 | token_secret: req.session.oauth_token_secret, 64 | verifier: req.query.oauth_verifier, 65 | realmId: req.query.realmId 66 | } 67 | } 68 | request.post(postBody, function (e, r, data) { 69 | var accessToken = qs.parse(data) 70 | console.log(accessToken) 71 | console.log(postBody.oauth.realmId) 72 | 73 | // save the access token somewhere on behalf of the logged in user 74 | qbo = new QuickBooks(consumerKey, 75 | consumerSecret, 76 | accessToken.oauth_token, 77 | accessToken.oauth_token_secret, 78 | postBody.oauth.realmId, 79 | true, // use the Sandbox 80 | true); // turn debugging on 81 | 82 | // test out account access 83 | qbo.findAccounts(function(_, accounts) { 84 | accounts.QueryResponse.Account.forEach(function(account) { 85 | console.log(account.Name) 86 | }) 87 | }) 88 | }) 89 | res.send('') 90 | }) 91 | -------------------------------------------------------------------------------- /example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "node-quickbooks-example-app", 3 | "version": "0.0.1", 4 | "description": "Example Express application for Intuit's node.js client for QuickBooks V3 API.", 5 | "main": "app.js", 6 | "keywords": [ 7 | "Intuit", 8 | "QuickBooks", 9 | "Intuit Developer" 10 | ], 11 | "author": "Michael Cohen", 12 | "license": "ISC", 13 | "dependencies": { 14 | "body-parser": "^1.13.3", 15 | "cookie-parser": "^1.3.5", 16 | "ejs": "3.1.7", 17 | "express": "^4.13.3", 18 | "express-session": "^1.11.3", 19 | "node-quickbooks": "2.0.0" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /example/views/intuit.ejs: -------------------------------------------------------------------------------- 1 | 2 | 4 | QBO Connect 5 | 6 | 7 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /oauth2example/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /oauth2example/app.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | var http = require('http'); 4 | var port = process.env.PORT || 3000; 5 | var request = require('request'); 6 | var qs = require('querystring'); 7 | var util = require('util'); 8 | var bodyParser = require('body-parser'); 9 | var cookieParser = require('cookie-parser'); 10 | var session = require('express-session'); 11 | var express = require('express'); 12 | var app = express(); 13 | var QuickBooks = require('../index'); 14 | var Tokens = require('csrf'); 15 | var csrf = new Tokens(); 16 | 17 | QuickBooks.setOauthVersion('2.0'); 18 | 19 | // Generic Express config 20 | app.set('port', port); 21 | app.set('views', 'views'); 22 | app.use(bodyParser.json()); 23 | app.use(bodyParser.urlencoded({ extended: true })); 24 | app.use(cookieParser('brad')); 25 | app.use(session({ resave: false, saveUninitialized: false, secret: 'smith' })); 26 | 27 | app.listen(app.get('port'), function () { 28 | console.log('Express server listening on port ' + app.get('port')); 29 | }); 30 | 31 | // INSERT YOUR CONSUMER_KEY AND CONSUMER_SECRET HERE 32 | 33 | var consumerKey = ''; 34 | var consumerSecret = ''; 35 | 36 | app.get('/', function (req, res) { 37 | res.redirect('/start'); 38 | }); 39 | 40 | app.get('/start', function (req, res) { 41 | res.render('intuit.ejs', { port: port, appCenter: QuickBooks.APP_CENTER_BASE }); 42 | }); 43 | 44 | // OAUTH 2 makes use of redirect requests 45 | function generateAntiForgery (session) { 46 | session.secret = csrf.secretSync(); 47 | return csrf.create(session.secret); 48 | }; 49 | 50 | app.get('/requestToken', function (req, res) { 51 | var redirecturl = QuickBooks.AUTHORIZATION_URL + 52 | '?client_id=' + consumerKey + 53 | '&redirect_uri=' + encodeURIComponent('http://localhost:' + port + '/callback/') + //Make sure this path matches entry in application dashboard 54 | '&scope=com.intuit.quickbooks.accounting' + 55 | '&response_type=code' + 56 | '&state=' + generateAntiForgery(req.session); 57 | 58 | res.redirect(redirecturl); 59 | }); 60 | 61 | app.get('/callback', function (req, res) { 62 | var auth = (Buffer.from(consumerKey + ':' + consumerSecret).toString('base64')); 63 | 64 | var postBody = { 65 | url: 'https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer', 66 | headers: { 67 | Accept: 'application/json', 68 | 'Content-Type': 'application/x-www-form-urlencoded', 69 | Authorization: 'Basic ' + auth, 70 | }, 71 | form: { 72 | grant_type: 'authorization_code', 73 | code: req.query.code, 74 | redirect_uri: 'http://localhost:' + port + '/callback/' //Make sure this path matches entry in application dashboard 75 | } 76 | }; 77 | 78 | request.post(postBody, function (e, r, data) { 79 | var accessToken = JSON.parse(r.body); 80 | 81 | // save the access token somewhere on behalf of the logged in user 82 | var qbo = new QuickBooks(consumerKey, 83 | consumerSecret, 84 | accessToken.access_token, /* oAuth access token */ 85 | false, /* no token secret for oAuth 2.0 */ 86 | req.query.realmId, 87 | true, /* use a sandbox account */ 88 | true, /* turn debugging on */ 89 | 4, /* minor version */ 90 | '2.0', /* oauth version */ 91 | accessToken.refresh_token /* refresh token */); 92 | 93 | qbo.findAccounts(function (_, accounts) { 94 | accounts.QueryResponse.Account.forEach(function (account) { 95 | console.log(account.Name); 96 | }); 97 | }); 98 | 99 | }); 100 | 101 | res.send(''); 102 | }); 103 | 104 | -------------------------------------------------------------------------------- /oauth2example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "node-quickbooks-example-app", 3 | "version": "0.0.1", 4 | "description": "Example Express application for Intuit's node.js client for QuickBooks V3 API.", 5 | "main": "app.js", 6 | "keywords": [ 7 | "Intuit", 8 | "QuickBooks", 9 | "Intuit Developer" 10 | ], 11 | "author": "Michael Cohen", 12 | "license": "ISC", 13 | "dependencies": { 14 | "body-parser": "^1.13.3", 15 | "cookie-parser": "^1.3.5", 16 | "csrf": "^3.0.6", 17 | "ejs": "3.1.7", 18 | "express": "^4.13.3", 19 | "express-session": "^1.11.3", 20 | "node-quickbooks": "2.0.0" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /oauth2example/views/intuit.ejs: -------------------------------------------------------------------------------- 1 | 2 | 4 | QBO Connect 5 | 6 | 7 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "node-quickbooks", 3 | "version": "2.0.46", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "node-quickbooks", 9 | "version": "2.0.46", 10 | "license": "ISC", 11 | "dependencies": { 12 | "bluebird": "3.3.4", 13 | "date-fns": "^2.9.0", 14 | "fast-xml-parser": "^4.3.2", 15 | "querystring": "0.2.0", 16 | "request": "2.88.0", 17 | "request-debug": "0.2.0", 18 | "underscore": "1.12.1", 19 | "util": "0.10.3", 20 | "uuid": "^8.3.2" 21 | }, 22 | "devDependencies": { 23 | "async": "0.9.0", 24 | "bluebird": "2.9.25", 25 | "expect": "0.1.1", 26 | "mocha": "10.1.0", 27 | "ramda": "0.17.1" 28 | } 29 | }, 30 | "node_modules/ansi-colors": { 31 | "version": "4.1.1", 32 | "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", 33 | "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", 34 | "dev": true, 35 | "engines": { 36 | "node": ">=6" 37 | } 38 | }, 39 | "node_modules/ansi-regex": { 40 | "version": "5.0.1", 41 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", 42 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", 43 | "dev": true, 44 | "engines": { 45 | "node": ">=8" 46 | } 47 | }, 48 | "node_modules/ansi-styles": { 49 | "version": "4.3.0", 50 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 51 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 52 | "dev": true, 53 | "dependencies": { 54 | "color-convert": "^2.0.1" 55 | }, 56 | "engines": { 57 | "node": ">=8" 58 | }, 59 | "funding": { 60 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 61 | } 62 | }, 63 | "node_modules/anymatch": { 64 | "version": "3.1.3", 65 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", 66 | "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", 67 | "dev": true, 68 | "dependencies": { 69 | "normalize-path": "^3.0.0", 70 | "picomatch": "^2.0.4" 71 | }, 72 | "engines": { 73 | "node": ">= 8" 74 | } 75 | }, 76 | "node_modules/argparse": { 77 | "version": "2.0.1", 78 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", 79 | "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", 80 | "dev": true 81 | }, 82 | "node_modules/asn1": { 83 | "version": "0.2.4", 84 | "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", 85 | "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", 86 | "dependencies": { 87 | "safer-buffer": "~2.1.0" 88 | } 89 | }, 90 | "node_modules/assert-plus": { 91 | "version": "1.0.0", 92 | "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", 93 | "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", 94 | "engines": { 95 | "node": ">=0.8" 96 | } 97 | }, 98 | "node_modules/async": { 99 | "version": "0.9.0", 100 | "resolved": "https://registry.npmjs.org/async/-/async-0.9.0.tgz", 101 | "integrity": "sha1-rDYTsdqb7RtHUQu0ZRuJMeRxRsc=", 102 | "dev": true 103 | }, 104 | "node_modules/asynckit": { 105 | "version": "0.4.0", 106 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 107 | "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" 108 | }, 109 | "node_modules/aws-sign2": { 110 | "version": "0.7.0", 111 | "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", 112 | "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", 113 | "engines": { 114 | "node": "*" 115 | } 116 | }, 117 | "node_modules/aws4": { 118 | "version": "1.8.0", 119 | "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", 120 | "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" 121 | }, 122 | "node_modules/balanced-match": { 123 | "version": "1.0.2", 124 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 125 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 126 | "dev": true 127 | }, 128 | "node_modules/bcrypt-pbkdf": { 129 | "version": "1.0.2", 130 | "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", 131 | "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", 132 | "dependencies": { 133 | "tweetnacl": "^0.14.3" 134 | } 135 | }, 136 | "node_modules/binary-extensions": { 137 | "version": "2.2.0", 138 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", 139 | "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", 140 | "dev": true, 141 | "engines": { 142 | "node": ">=8" 143 | } 144 | }, 145 | "node_modules/bluebird": { 146 | "version": "2.9.25", 147 | "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.9.25.tgz", 148 | "integrity": "sha512-n0x59uhYAO5orhuwIfH4DOYonfu3qmFjq2ir0LwsstKs8hK3uP5OWY5AzivYpdZ4VEK56FNlOnAhzCorh+YOlA==", 149 | "dev": true 150 | }, 151 | "node_modules/brace-expansion": { 152 | "version": "1.1.11", 153 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 154 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 155 | "dev": true, 156 | "dependencies": { 157 | "balanced-match": "^1.0.0", 158 | "concat-map": "0.0.1" 159 | } 160 | }, 161 | "node_modules/braces": { 162 | "version": "3.0.2", 163 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", 164 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 165 | "dev": true, 166 | "dependencies": { 167 | "fill-range": "^7.0.1" 168 | }, 169 | "engines": { 170 | "node": ">=8" 171 | } 172 | }, 173 | "node_modules/browser-stdout": { 174 | "version": "1.3.1", 175 | "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", 176 | "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", 177 | "dev": true 178 | }, 179 | "node_modules/camelcase": { 180 | "version": "6.3.0", 181 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", 182 | "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", 183 | "dev": true, 184 | "engines": { 185 | "node": ">=10" 186 | }, 187 | "funding": { 188 | "url": "https://github.com/sponsors/sindresorhus" 189 | } 190 | }, 191 | "node_modules/caseless": { 192 | "version": "0.12.0", 193 | "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", 194 | "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" 195 | }, 196 | "node_modules/chalk": { 197 | "version": "4.1.2", 198 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 199 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 200 | "dev": true, 201 | "dependencies": { 202 | "ansi-styles": "^4.1.0", 203 | "supports-color": "^7.1.0" 204 | }, 205 | "engines": { 206 | "node": ">=10" 207 | }, 208 | "funding": { 209 | "url": "https://github.com/chalk/chalk?sponsor=1" 210 | } 211 | }, 212 | "node_modules/chalk/node_modules/supports-color": { 213 | "version": "7.2.0", 214 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 215 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 216 | "dev": true, 217 | "dependencies": { 218 | "has-flag": "^4.0.0" 219 | }, 220 | "engines": { 221 | "node": ">=8" 222 | } 223 | }, 224 | "node_modules/chokidar": { 225 | "version": "3.5.3", 226 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", 227 | "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", 228 | "dev": true, 229 | "funding": [ 230 | { 231 | "type": "individual", 232 | "url": "https://paulmillr.com/funding/" 233 | } 234 | ], 235 | "dependencies": { 236 | "anymatch": "~3.1.2", 237 | "braces": "~3.0.2", 238 | "glob-parent": "~5.1.2", 239 | "is-binary-path": "~2.1.0", 240 | "is-glob": "~4.0.1", 241 | "normalize-path": "~3.0.0", 242 | "readdirp": "~3.6.0" 243 | }, 244 | "engines": { 245 | "node": ">= 8.10.0" 246 | }, 247 | "optionalDependencies": { 248 | "fsevents": "~2.3.2" 249 | } 250 | }, 251 | "node_modules/cliui": { 252 | "version": "7.0.4", 253 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", 254 | "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", 255 | "dev": true, 256 | "dependencies": { 257 | "string-width": "^4.2.0", 258 | "strip-ansi": "^6.0.0", 259 | "wrap-ansi": "^7.0.0" 260 | } 261 | }, 262 | "node_modules/color-convert": { 263 | "version": "2.0.1", 264 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 265 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 266 | "dev": true, 267 | "dependencies": { 268 | "color-name": "~1.1.4" 269 | }, 270 | "engines": { 271 | "node": ">=7.0.0" 272 | } 273 | }, 274 | "node_modules/color-name": { 275 | "version": "1.1.4", 276 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 277 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 278 | "dev": true 279 | }, 280 | "node_modules/combined-stream": { 281 | "version": "1.0.7", 282 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", 283 | "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", 284 | "dependencies": { 285 | "delayed-stream": "~1.0.0" 286 | }, 287 | "engines": { 288 | "node": ">= 0.8" 289 | } 290 | }, 291 | "node_modules/concat-map": { 292 | "version": "0.0.1", 293 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 294 | "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", 295 | "dev": true 296 | }, 297 | "node_modules/core-util-is": { 298 | "version": "1.0.2", 299 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", 300 | "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" 301 | }, 302 | "node_modules/dashdash": { 303 | "version": "1.14.1", 304 | "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", 305 | "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", 306 | "dependencies": { 307 | "assert-plus": "^1.0.0" 308 | }, 309 | "engines": { 310 | "node": ">=0.10" 311 | } 312 | }, 313 | "node_modules/date-fns": { 314 | "version": "2.9.0", 315 | "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.9.0.tgz", 316 | "integrity": "sha512-khbFLu/MlzLjEzy9Gh8oY1hNt/Dvxw3J6Rbc28cVoYWQaC1S3YI4xwkF9ZWcjDLscbZlY9hISMr66RFzZagLsA==" 317 | }, 318 | "node_modules/debug": { 319 | "version": "4.3.4", 320 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", 321 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", 322 | "dev": true, 323 | "dependencies": { 324 | "ms": "2.1.2" 325 | }, 326 | "engines": { 327 | "node": ">=6.0" 328 | }, 329 | "peerDependenciesMeta": { 330 | "supports-color": { 331 | "optional": true 332 | } 333 | } 334 | }, 335 | "node_modules/debug/node_modules/ms": { 336 | "version": "2.1.2", 337 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 338 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 339 | "dev": true 340 | }, 341 | "node_modules/decamelize": { 342 | "version": "4.0.0", 343 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", 344 | "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", 345 | "dev": true, 346 | "engines": { 347 | "node": ">=10" 348 | }, 349 | "funding": { 350 | "url": "https://github.com/sponsors/sindresorhus" 351 | } 352 | }, 353 | "node_modules/delayed-stream": { 354 | "version": "1.0.0", 355 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 356 | "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", 357 | "engines": { 358 | "node": ">=0.4.0" 359 | } 360 | }, 361 | "node_modules/diff": { 362 | "version": "5.0.0", 363 | "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", 364 | "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", 365 | "dev": true, 366 | "engines": { 367 | "node": ">=0.3.1" 368 | } 369 | }, 370 | "node_modules/ecc-jsbn": { 371 | "version": "0.1.2", 372 | "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", 373 | "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", 374 | "dependencies": { 375 | "jsbn": "~0.1.0", 376 | "safer-buffer": "^2.1.0" 377 | } 378 | }, 379 | "node_modules/emoji-regex": { 380 | "version": "8.0.0", 381 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 382 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", 383 | "dev": true 384 | }, 385 | "node_modules/escalade": { 386 | "version": "3.1.1", 387 | "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", 388 | "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", 389 | "dev": true, 390 | "engines": { 391 | "node": ">=6" 392 | } 393 | }, 394 | "node_modules/escape-string-regexp": { 395 | "version": "4.0.0", 396 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", 397 | "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", 398 | "dev": true, 399 | "engines": { 400 | "node": ">=10" 401 | }, 402 | "funding": { 403 | "url": "https://github.com/sponsors/sindresorhus" 404 | } 405 | }, 406 | "node_modules/expect": { 407 | "version": "0.1.1", 408 | "resolved": "https://registry.npmjs.org/expect/-/expect-0.1.1.tgz", 409 | "integrity": "sha1-E5kGtGI1zxnIIElnN0J9jP5h9t0=", 410 | "dev": true 411 | }, 412 | "node_modules/extend": { 413 | "version": "3.0.2", 414 | "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", 415 | "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" 416 | }, 417 | "node_modules/extsprintf": { 418 | "version": "1.3.0", 419 | "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", 420 | "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", 421 | "engines": [ 422 | "node >=0.6.0" 423 | ] 424 | }, 425 | "node_modules/fast-json-stable-stringify": { 426 | "version": "2.0.0", 427 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", 428 | "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" 429 | }, 430 | "node_modules/fast-xml-parser": { 431 | "version": "4.3.2", 432 | "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.3.2.tgz", 433 | "integrity": "sha512-rmrXUXwbJedoXkStenj1kkljNF7ugn5ZjR9FJcwmCfcCbtOMDghPajbc+Tck6vE6F5XsDmx+Pr2le9fw8+pXBg==", 434 | "funding": [ 435 | { 436 | "type": "github", 437 | "url": "https://github.com/sponsors/NaturalIntelligence" 438 | }, 439 | { 440 | "type": "paypal", 441 | "url": "https://paypal.me/naturalintelligence" 442 | } 443 | ], 444 | "dependencies": { 445 | "strnum": "^1.0.5" 446 | }, 447 | "bin": { 448 | "fxparser": "src/cli/cli.js" 449 | } 450 | }, 451 | "node_modules/fill-range": { 452 | "version": "7.0.1", 453 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", 454 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 455 | "dev": true, 456 | "dependencies": { 457 | "to-regex-range": "^5.0.1" 458 | }, 459 | "engines": { 460 | "node": ">=8" 461 | } 462 | }, 463 | "node_modules/find-up": { 464 | "version": "5.0.0", 465 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", 466 | "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", 467 | "dev": true, 468 | "dependencies": { 469 | "locate-path": "^6.0.0", 470 | "path-exists": "^4.0.0" 471 | }, 472 | "engines": { 473 | "node": ">=10" 474 | }, 475 | "funding": { 476 | "url": "https://github.com/sponsors/sindresorhus" 477 | } 478 | }, 479 | "node_modules/flat": { 480 | "version": "5.0.2", 481 | "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", 482 | "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", 483 | "dev": true, 484 | "bin": { 485 | "flat": "cli.js" 486 | } 487 | }, 488 | "node_modules/forever-agent": { 489 | "version": "0.6.1", 490 | "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", 491 | "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", 492 | "engines": { 493 | "node": "*" 494 | } 495 | }, 496 | "node_modules/form-data": { 497 | "version": "2.3.3", 498 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", 499 | "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", 500 | "dependencies": { 501 | "asynckit": "^0.4.0", 502 | "combined-stream": "^1.0.6", 503 | "mime-types": "^2.1.12" 504 | }, 505 | "engines": { 506 | "node": ">= 0.12" 507 | } 508 | }, 509 | "node_modules/fs.realpath": { 510 | "version": "1.0.0", 511 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 512 | "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", 513 | "dev": true 514 | }, 515 | "node_modules/fsevents": { 516 | "version": "2.3.2", 517 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", 518 | "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", 519 | "dev": true, 520 | "hasInstallScript": true, 521 | "optional": true, 522 | "os": [ 523 | "darwin" 524 | ], 525 | "engines": { 526 | "node": "^8.16.0 || ^10.6.0 || >=11.0.0" 527 | } 528 | }, 529 | "node_modules/get-caller-file": { 530 | "version": "2.0.5", 531 | "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", 532 | "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", 533 | "dev": true, 534 | "engines": { 535 | "node": "6.* || 8.* || >= 10.*" 536 | } 537 | }, 538 | "node_modules/getpass": { 539 | "version": "0.1.7", 540 | "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", 541 | "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", 542 | "dependencies": { 543 | "assert-plus": "^1.0.0" 544 | } 545 | }, 546 | "node_modules/glob": { 547 | "version": "7.2.0", 548 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", 549 | "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", 550 | "dev": true, 551 | "dependencies": { 552 | "fs.realpath": "^1.0.0", 553 | "inflight": "^1.0.4", 554 | "inherits": "2", 555 | "minimatch": "^3.0.4", 556 | "once": "^1.3.0", 557 | "path-is-absolute": "^1.0.0" 558 | }, 559 | "engines": { 560 | "node": "*" 561 | }, 562 | "funding": { 563 | "url": "https://github.com/sponsors/isaacs" 564 | } 565 | }, 566 | "node_modules/glob-parent": { 567 | "version": "5.1.2", 568 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 569 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 570 | "dev": true, 571 | "dependencies": { 572 | "is-glob": "^4.0.1" 573 | }, 574 | "engines": { 575 | "node": ">= 6" 576 | } 577 | }, 578 | "node_modules/glob/node_modules/minimatch": { 579 | "version": "3.1.2", 580 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 581 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 582 | "dev": true, 583 | "dependencies": { 584 | "brace-expansion": "^1.1.7" 585 | }, 586 | "engines": { 587 | "node": "*" 588 | } 589 | }, 590 | "node_modules/har-schema": { 591 | "version": "2.0.0", 592 | "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", 593 | "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", 594 | "engines": { 595 | "node": ">=4" 596 | } 597 | }, 598 | "node_modules/har-validator": { 599 | "version": "5.1.5", 600 | "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", 601 | "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", 602 | "deprecated": "this library is no longer supported", 603 | "dependencies": { 604 | "ajv": "^6.12.3", 605 | "har-schema": "^2.0.0" 606 | }, 607 | "engines": { 608 | "node": ">=6" 609 | } 610 | }, 611 | "node_modules/har-validator/node_modules/ajv": { 612 | "version": "6.12.6", 613 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", 614 | "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", 615 | "dependencies": { 616 | "fast-deep-equal": "^3.1.1", 617 | "fast-json-stable-stringify": "^2.0.0", 618 | "json-schema-traverse": "^0.4.1", 619 | "uri-js": "^4.2.2" 620 | }, 621 | "funding": { 622 | "type": "github", 623 | "url": "https://github.com/sponsors/epoberezkin" 624 | } 625 | }, 626 | "node_modules/har-validator/node_modules/fast-deep-equal": { 627 | "version": "3.1.3", 628 | "resolved": "http://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", 629 | "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" 630 | }, 631 | "node_modules/har-validator/node_modules/json-schema-traverse": { 632 | "version": "0.4.1", 633 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", 634 | "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" 635 | }, 636 | "node_modules/has-flag": { 637 | "version": "4.0.0", 638 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 639 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 640 | "dev": true, 641 | "engines": { 642 | "node": ">=8" 643 | } 644 | }, 645 | "node_modules/he": { 646 | "version": "1.2.0", 647 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", 648 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", 649 | "dev": true, 650 | "bin": { 651 | "he": "bin/he" 652 | } 653 | }, 654 | "node_modules/http-signature": { 655 | "version": "1.2.0", 656 | "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", 657 | "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", 658 | "dependencies": { 659 | "assert-plus": "^1.0.0", 660 | "jsprim": "^1.2.2", 661 | "sshpk": "^1.7.0" 662 | }, 663 | "engines": { 664 | "node": ">=0.8", 665 | "npm": ">=1.3.7" 666 | } 667 | }, 668 | "node_modules/inflight": { 669 | "version": "1.0.6", 670 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 671 | "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", 672 | "dev": true, 673 | "dependencies": { 674 | "once": "^1.3.0", 675 | "wrappy": "1" 676 | } 677 | }, 678 | "node_modules/inherits": { 679 | "version": "2.0.4", 680 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 681 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 682 | "dev": true 683 | }, 684 | "node_modules/is-binary-path": { 685 | "version": "2.1.0", 686 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", 687 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 688 | "dev": true, 689 | "dependencies": { 690 | "binary-extensions": "^2.0.0" 691 | }, 692 | "engines": { 693 | "node": ">=8" 694 | } 695 | }, 696 | "node_modules/is-extglob": { 697 | "version": "2.1.1", 698 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 699 | "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", 700 | "dev": true, 701 | "engines": { 702 | "node": ">=0.10.0" 703 | } 704 | }, 705 | "node_modules/is-fullwidth-code-point": { 706 | "version": "3.0.0", 707 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 708 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 709 | "dev": true, 710 | "engines": { 711 | "node": ">=8" 712 | } 713 | }, 714 | "node_modules/is-glob": { 715 | "version": "4.0.3", 716 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", 717 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", 718 | "dev": true, 719 | "dependencies": { 720 | "is-extglob": "^2.1.1" 721 | }, 722 | "engines": { 723 | "node": ">=0.10.0" 724 | } 725 | }, 726 | "node_modules/is-number": { 727 | "version": "7.0.0", 728 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 729 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 730 | "dev": true, 731 | "engines": { 732 | "node": ">=0.12.0" 733 | } 734 | }, 735 | "node_modules/is-plain-obj": { 736 | "version": "2.1.0", 737 | "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", 738 | "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", 739 | "dev": true, 740 | "engines": { 741 | "node": ">=8" 742 | } 743 | }, 744 | "node_modules/is-typedarray": { 745 | "version": "1.0.0", 746 | "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", 747 | "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" 748 | }, 749 | "node_modules/is-unicode-supported": { 750 | "version": "0.1.0", 751 | "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", 752 | "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", 753 | "dev": true, 754 | "engines": { 755 | "node": ">=10" 756 | }, 757 | "funding": { 758 | "url": "https://github.com/sponsors/sindresorhus" 759 | } 760 | }, 761 | "node_modules/isstream": { 762 | "version": "0.1.2", 763 | "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", 764 | "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" 765 | }, 766 | "node_modules/js-yaml": { 767 | "version": "4.1.0", 768 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", 769 | "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", 770 | "dev": true, 771 | "dependencies": { 772 | "argparse": "^2.0.1" 773 | }, 774 | "bin": { 775 | "js-yaml": "bin/js-yaml.js" 776 | } 777 | }, 778 | "node_modules/jsbn": { 779 | "version": "0.1.1", 780 | "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", 781 | "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" 782 | }, 783 | "node_modules/json-stringify-safe": { 784 | "version": "5.0.1", 785 | "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", 786 | "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" 787 | }, 788 | "node_modules/jsprim": { 789 | "version": "1.4.2", 790 | "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", 791 | "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", 792 | "dependencies": { 793 | "assert-plus": "1.0.0", 794 | "extsprintf": "1.3.0", 795 | "json-schema": "0.4.0", 796 | "verror": "1.10.0" 797 | }, 798 | "engines": { 799 | "node": ">=0.6.0" 800 | } 801 | }, 802 | "node_modules/jsprim/node_modules/json-schema": { 803 | "version": "0.4.0", 804 | "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", 805 | "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" 806 | }, 807 | "node_modules/locate-path": { 808 | "version": "6.0.0", 809 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", 810 | "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", 811 | "dev": true, 812 | "dependencies": { 813 | "p-locate": "^5.0.0" 814 | }, 815 | "engines": { 816 | "node": ">=10" 817 | }, 818 | "funding": { 819 | "url": "https://github.com/sponsors/sindresorhus" 820 | } 821 | }, 822 | "node_modules/log-symbols": { 823 | "version": "4.1.0", 824 | "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", 825 | "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", 826 | "dev": true, 827 | "dependencies": { 828 | "chalk": "^4.1.0", 829 | "is-unicode-supported": "^0.1.0" 830 | }, 831 | "engines": { 832 | "node": ">=10" 833 | }, 834 | "funding": { 835 | "url": "https://github.com/sponsors/sindresorhus" 836 | } 837 | }, 838 | "node_modules/mime-db": { 839 | "version": "1.37.0", 840 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz", 841 | "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==", 842 | "engines": { 843 | "node": ">= 0.6" 844 | } 845 | }, 846 | "node_modules/mime-types": { 847 | "version": "2.1.21", 848 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz", 849 | "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==", 850 | "dependencies": { 851 | "mime-db": "~1.37.0" 852 | }, 853 | "engines": { 854 | "node": ">= 0.6" 855 | } 856 | }, 857 | "node_modules/minimatch": { 858 | "version": "5.0.1", 859 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", 860 | "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", 861 | "dev": true, 862 | "dependencies": { 863 | "brace-expansion": "^2.0.1" 864 | }, 865 | "engines": { 866 | "node": ">=10" 867 | } 868 | }, 869 | "node_modules/minimatch/node_modules/brace-expansion": { 870 | "version": "2.0.1", 871 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", 872 | "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", 873 | "dev": true, 874 | "dependencies": { 875 | "balanced-match": "^1.0.0" 876 | } 877 | }, 878 | "node_modules/mocha": { 879 | "version": "10.1.0", 880 | "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.1.0.tgz", 881 | "integrity": "sha512-vUF7IYxEoN7XhQpFLxQAEMtE4W91acW4B6En9l97MwE9stL1A9gusXfoHZCLVHDUJ/7V5+lbCM6yMqzo5vNymg==", 882 | "dev": true, 883 | "dependencies": { 884 | "ansi-colors": "4.1.1", 885 | "browser-stdout": "1.3.1", 886 | "chokidar": "3.5.3", 887 | "debug": "4.3.4", 888 | "diff": "5.0.0", 889 | "escape-string-regexp": "4.0.0", 890 | "find-up": "5.0.0", 891 | "glob": "7.2.0", 892 | "he": "1.2.0", 893 | "js-yaml": "4.1.0", 894 | "log-symbols": "4.1.0", 895 | "minimatch": "5.0.1", 896 | "ms": "2.1.3", 897 | "nanoid": "3.3.3", 898 | "serialize-javascript": "6.0.0", 899 | "strip-json-comments": "3.1.1", 900 | "supports-color": "8.1.1", 901 | "workerpool": "6.2.1", 902 | "yargs": "16.2.0", 903 | "yargs-parser": "20.2.4", 904 | "yargs-unparser": "2.0.0" 905 | }, 906 | "bin": { 907 | "_mocha": "bin/_mocha", 908 | "mocha": "bin/mocha.js" 909 | }, 910 | "engines": { 911 | "node": ">= 14.0.0" 912 | }, 913 | "funding": { 914 | "type": "opencollective", 915 | "url": "https://opencollective.com/mochajs" 916 | } 917 | }, 918 | "node_modules/ms": { 919 | "version": "2.1.3", 920 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 921 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 922 | "dev": true 923 | }, 924 | "node_modules/nanoid": { 925 | "version": "3.3.3", 926 | "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", 927 | "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", 928 | "dev": true, 929 | "bin": { 930 | "nanoid": "bin/nanoid.cjs" 931 | }, 932 | "engines": { 933 | "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" 934 | } 935 | }, 936 | "node_modules/normalize-path": { 937 | "version": "3.0.0", 938 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", 939 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", 940 | "dev": true, 941 | "engines": { 942 | "node": ">=0.10.0" 943 | } 944 | }, 945 | "node_modules/oauth-sign": { 946 | "version": "0.9.0", 947 | "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", 948 | "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", 949 | "engines": { 950 | "node": "*" 951 | } 952 | }, 953 | "node_modules/once": { 954 | "version": "1.4.0", 955 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 956 | "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", 957 | "dev": true, 958 | "dependencies": { 959 | "wrappy": "1" 960 | } 961 | }, 962 | "node_modules/p-limit": { 963 | "version": "3.1.0", 964 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", 965 | "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", 966 | "dev": true, 967 | "dependencies": { 968 | "yocto-queue": "^0.1.0" 969 | }, 970 | "engines": { 971 | "node": ">=10" 972 | }, 973 | "funding": { 974 | "url": "https://github.com/sponsors/sindresorhus" 975 | } 976 | }, 977 | "node_modules/p-locate": { 978 | "version": "5.0.0", 979 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", 980 | "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", 981 | "dev": true, 982 | "dependencies": { 983 | "p-limit": "^3.0.2" 984 | }, 985 | "engines": { 986 | "node": ">=10" 987 | }, 988 | "funding": { 989 | "url": "https://github.com/sponsors/sindresorhus" 990 | } 991 | }, 992 | "node_modules/path-exists": { 993 | "version": "4.0.0", 994 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", 995 | "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", 996 | "dev": true, 997 | "engines": { 998 | "node": ">=8" 999 | } 1000 | }, 1001 | "node_modules/path-is-absolute": { 1002 | "version": "1.0.1", 1003 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 1004 | "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", 1005 | "dev": true, 1006 | "engines": { 1007 | "node": ">=0.10.0" 1008 | } 1009 | }, 1010 | "node_modules/performance-now": { 1011 | "version": "2.1.0", 1012 | "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", 1013 | "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" 1014 | }, 1015 | "node_modules/picomatch": { 1016 | "version": "2.3.1", 1017 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", 1018 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", 1019 | "dev": true, 1020 | "engines": { 1021 | "node": ">=8.6" 1022 | }, 1023 | "funding": { 1024 | "url": "https://github.com/sponsors/jonschlinkert" 1025 | } 1026 | }, 1027 | "node_modules/psl": { 1028 | "version": "1.1.29", 1029 | "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz", 1030 | "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==" 1031 | }, 1032 | "node_modules/punycode": { 1033 | "version": "1.4.1", 1034 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", 1035 | "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" 1036 | }, 1037 | "node_modules/qs": { 1038 | "version": "6.5.3", 1039 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", 1040 | "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", 1041 | "engines": { 1042 | "node": ">=0.6" 1043 | } 1044 | }, 1045 | "node_modules/querystring": { 1046 | "version": "0.2.0", 1047 | "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", 1048 | "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", 1049 | "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", 1050 | "engines": { 1051 | "node": ">=0.4.x" 1052 | } 1053 | }, 1054 | "node_modules/ramda": { 1055 | "version": "0.17.1", 1056 | "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.17.1.tgz", 1057 | "integrity": "sha1-TBmBR9OrVOjBUlXxFzDiEW9uYHM=", 1058 | "dev": true 1059 | }, 1060 | "node_modules/randombytes": { 1061 | "version": "2.1.0", 1062 | "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", 1063 | "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", 1064 | "dev": true, 1065 | "dependencies": { 1066 | "safe-buffer": "^5.1.0" 1067 | } 1068 | }, 1069 | "node_modules/readdirp": { 1070 | "version": "3.6.0", 1071 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", 1072 | "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", 1073 | "dev": true, 1074 | "dependencies": { 1075 | "picomatch": "^2.2.1" 1076 | }, 1077 | "engines": { 1078 | "node": ">=8.10.0" 1079 | } 1080 | }, 1081 | "node_modules/request": { 1082 | "version": "2.88.0", 1083 | "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", 1084 | "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", 1085 | "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", 1086 | "dependencies": { 1087 | "aws-sign2": "~0.7.0", 1088 | "aws4": "^1.8.0", 1089 | "caseless": "~0.12.0", 1090 | "combined-stream": "~1.0.6", 1091 | "extend": "~3.0.2", 1092 | "forever-agent": "~0.6.1", 1093 | "form-data": "~2.3.2", 1094 | "har-validator": "~5.1.0", 1095 | "http-signature": "~1.2.0", 1096 | "is-typedarray": "~1.0.0", 1097 | "isstream": "~0.1.2", 1098 | "json-stringify-safe": "~5.0.1", 1099 | "mime-types": "~2.1.19", 1100 | "oauth-sign": "~0.9.0", 1101 | "performance-now": "^2.1.0", 1102 | "qs": "~6.5.2", 1103 | "safe-buffer": "^5.1.2", 1104 | "tough-cookie": "~2.4.3", 1105 | "tunnel-agent": "^0.6.0", 1106 | "uuid": "^3.3.2" 1107 | }, 1108 | "engines": { 1109 | "node": ">= 4" 1110 | } 1111 | }, 1112 | "node_modules/request-debug": { 1113 | "version": "0.2.0", 1114 | "resolved": "https://registry.npmjs.org/request-debug/-/request-debug-0.2.0.tgz", 1115 | "integrity": "sha1-/AVOyBcYGwTKQaBSwTb2HEirr3g=", 1116 | "dependencies": { 1117 | "stringify-clone": "^1.0.0" 1118 | } 1119 | }, 1120 | "node_modules/request/node_modules/uuid": { 1121 | "version": "3.3.2", 1122 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", 1123 | "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", 1124 | "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", 1125 | "bin": { 1126 | "uuid": "bin/uuid" 1127 | } 1128 | }, 1129 | "node_modules/require-directory": { 1130 | "version": "2.1.1", 1131 | "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", 1132 | "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", 1133 | "dev": true, 1134 | "engines": { 1135 | "node": ">=0.10.0" 1136 | } 1137 | }, 1138 | "node_modules/safe-buffer": { 1139 | "version": "5.1.2", 1140 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 1141 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" 1142 | }, 1143 | "node_modules/safer-buffer": { 1144 | "version": "2.1.2", 1145 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 1146 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 1147 | }, 1148 | "node_modules/serialize-javascript": { 1149 | "version": "6.0.0", 1150 | "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", 1151 | "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", 1152 | "dev": true, 1153 | "dependencies": { 1154 | "randombytes": "^2.1.0" 1155 | } 1156 | }, 1157 | "node_modules/sshpk": { 1158 | "version": "1.15.2", 1159 | "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.15.2.tgz", 1160 | "integrity": "sha512-Ra/OXQtuh0/enyl4ETZAfTaeksa6BXks5ZcjpSUNrjBr0DvrJKX+1fsKDPpT9TBXgHAFsa4510aNVgI8g/+SzA==", 1161 | "dependencies": { 1162 | "asn1": "~0.2.3", 1163 | "assert-plus": "^1.0.0", 1164 | "bcrypt-pbkdf": "^1.0.0", 1165 | "dashdash": "^1.12.0", 1166 | "ecc-jsbn": "~0.1.1", 1167 | "getpass": "^0.1.1", 1168 | "jsbn": "~0.1.0", 1169 | "safer-buffer": "^2.0.2", 1170 | "tweetnacl": "~0.14.0" 1171 | }, 1172 | "bin": { 1173 | "sshpk-conv": "bin/sshpk-conv", 1174 | "sshpk-sign": "bin/sshpk-sign", 1175 | "sshpk-verify": "bin/sshpk-verify" 1176 | }, 1177 | "engines": { 1178 | "node": ">=0.10.0" 1179 | } 1180 | }, 1181 | "node_modules/string-width": { 1182 | "version": "4.2.3", 1183 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", 1184 | "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", 1185 | "dev": true, 1186 | "dependencies": { 1187 | "emoji-regex": "^8.0.0", 1188 | "is-fullwidth-code-point": "^3.0.0", 1189 | "strip-ansi": "^6.0.1" 1190 | }, 1191 | "engines": { 1192 | "node": ">=8" 1193 | } 1194 | }, 1195 | "node_modules/stringify-clone": { 1196 | "version": "1.1.1", 1197 | "resolved": "https://registry.npmjs.org/stringify-clone/-/stringify-clone-1.1.1.tgz", 1198 | "integrity": "sha1-MJojX7Ts/M19OI2+GLqQT6yvQzs=", 1199 | "engines": { 1200 | "node": ">=0.8" 1201 | } 1202 | }, 1203 | "node_modules/strip-ansi": { 1204 | "version": "6.0.1", 1205 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", 1206 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", 1207 | "dev": true, 1208 | "dependencies": { 1209 | "ansi-regex": "^5.0.1" 1210 | }, 1211 | "engines": { 1212 | "node": ">=8" 1213 | } 1214 | }, 1215 | "node_modules/strip-json-comments": { 1216 | "version": "3.1.1", 1217 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", 1218 | "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", 1219 | "dev": true, 1220 | "engines": { 1221 | "node": ">=8" 1222 | }, 1223 | "funding": { 1224 | "url": "https://github.com/sponsors/sindresorhus" 1225 | } 1226 | }, 1227 | "node_modules/strnum": { 1228 | "version": "1.0.5", 1229 | "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", 1230 | "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==" 1231 | }, 1232 | "node_modules/supports-color": { 1233 | "version": "8.1.1", 1234 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", 1235 | "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", 1236 | "dev": true, 1237 | "dependencies": { 1238 | "has-flag": "^4.0.0" 1239 | }, 1240 | "engines": { 1241 | "node": ">=10" 1242 | }, 1243 | "funding": { 1244 | "url": "https://github.com/chalk/supports-color?sponsor=1" 1245 | } 1246 | }, 1247 | "node_modules/to-regex-range": { 1248 | "version": "5.0.1", 1249 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 1250 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 1251 | "dev": true, 1252 | "dependencies": { 1253 | "is-number": "^7.0.0" 1254 | }, 1255 | "engines": { 1256 | "node": ">=8.0" 1257 | } 1258 | }, 1259 | "node_modules/tough-cookie": { 1260 | "version": "2.4.3", 1261 | "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", 1262 | "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", 1263 | "dependencies": { 1264 | "psl": "^1.1.24", 1265 | "punycode": "^1.4.1" 1266 | }, 1267 | "engines": { 1268 | "node": ">=0.8" 1269 | } 1270 | }, 1271 | "node_modules/tunnel-agent": { 1272 | "version": "0.6.0", 1273 | "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", 1274 | "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", 1275 | "dependencies": { 1276 | "safe-buffer": "^5.0.1" 1277 | }, 1278 | "engines": { 1279 | "node": "*" 1280 | } 1281 | }, 1282 | "node_modules/tweetnacl": { 1283 | "version": "0.14.5", 1284 | "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", 1285 | "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" 1286 | }, 1287 | "node_modules/underscore": { 1288 | "version": "1.12.1", 1289 | "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz", 1290 | "integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==" 1291 | }, 1292 | "node_modules/uri-js": { 1293 | "version": "4.4.1", 1294 | "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", 1295 | "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", 1296 | "dependencies": { 1297 | "punycode": "^2.1.0" 1298 | } 1299 | }, 1300 | "node_modules/uri-js/node_modules/punycode": { 1301 | "version": "2.1.1", 1302 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", 1303 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", 1304 | "engines": { 1305 | "node": ">=6" 1306 | } 1307 | }, 1308 | "node_modules/util": { 1309 | "version": "0.10.3", 1310 | "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", 1311 | "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", 1312 | "dependencies": { 1313 | "inherits": "2.0.1" 1314 | } 1315 | }, 1316 | "node_modules/util/node_modules/inherits": { 1317 | "version": "2.0.1", 1318 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", 1319 | "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" 1320 | }, 1321 | "node_modules/uuid": { 1322 | "version": "8.3.2", 1323 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", 1324 | "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", 1325 | "bin": { 1326 | "uuid": "dist/bin/uuid" 1327 | } 1328 | }, 1329 | "node_modules/verror": { 1330 | "version": "1.10.0", 1331 | "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", 1332 | "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", 1333 | "engines": [ 1334 | "node >=0.6.0" 1335 | ], 1336 | "dependencies": { 1337 | "assert-plus": "^1.0.0", 1338 | "core-util-is": "1.0.2", 1339 | "extsprintf": "^1.2.0" 1340 | } 1341 | }, 1342 | "node_modules/workerpool": { 1343 | "version": "6.2.1", 1344 | "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", 1345 | "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", 1346 | "dev": true 1347 | }, 1348 | "node_modules/wrap-ansi": { 1349 | "version": "7.0.0", 1350 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", 1351 | "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", 1352 | "dev": true, 1353 | "dependencies": { 1354 | "ansi-styles": "^4.0.0", 1355 | "string-width": "^4.1.0", 1356 | "strip-ansi": "^6.0.0" 1357 | }, 1358 | "engines": { 1359 | "node": ">=10" 1360 | }, 1361 | "funding": { 1362 | "url": "https://github.com/chalk/wrap-ansi?sponsor=1" 1363 | } 1364 | }, 1365 | "node_modules/wrappy": { 1366 | "version": "1.0.2", 1367 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 1368 | "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", 1369 | "dev": true 1370 | }, 1371 | "node_modules/y18n": { 1372 | "version": "5.0.8", 1373 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", 1374 | "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", 1375 | "dev": true, 1376 | "engines": { 1377 | "node": ">=10" 1378 | } 1379 | }, 1380 | "node_modules/yargs": { 1381 | "version": "16.2.0", 1382 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", 1383 | "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", 1384 | "dev": true, 1385 | "dependencies": { 1386 | "cliui": "^7.0.2", 1387 | "escalade": "^3.1.1", 1388 | "get-caller-file": "^2.0.5", 1389 | "require-directory": "^2.1.1", 1390 | "string-width": "^4.2.0", 1391 | "y18n": "^5.0.5", 1392 | "yargs-parser": "^20.2.2" 1393 | }, 1394 | "engines": { 1395 | "node": ">=10" 1396 | } 1397 | }, 1398 | "node_modules/yargs-parser": { 1399 | "version": "20.2.4", 1400 | "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", 1401 | "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", 1402 | "dev": true, 1403 | "engines": { 1404 | "node": ">=10" 1405 | } 1406 | }, 1407 | "node_modules/yargs-unparser": { 1408 | "version": "2.0.0", 1409 | "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", 1410 | "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", 1411 | "dev": true, 1412 | "dependencies": { 1413 | "camelcase": "^6.0.0", 1414 | "decamelize": "^4.0.0", 1415 | "flat": "^5.0.2", 1416 | "is-plain-obj": "^2.1.0" 1417 | }, 1418 | "engines": { 1419 | "node": ">=10" 1420 | } 1421 | }, 1422 | "node_modules/yocto-queue": { 1423 | "version": "0.1.0", 1424 | "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", 1425 | "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", 1426 | "dev": true, 1427 | "engines": { 1428 | "node": ">=10" 1429 | }, 1430 | "funding": { 1431 | "url": "https://github.com/sponsors/sindresorhus" 1432 | } 1433 | } 1434 | } 1435 | } 1436 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "node-quickbooks", 3 | "version": "2.0.46", 4 | "description": "node.js client for Intuit's IPP QuickBooks V3 API.", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "mocha" 8 | }, 9 | "keywords": [ 10 | "Intuit", 11 | "QuickBooks", 12 | "IPP" 13 | ], 14 | "author": "Michael Cohen", 15 | "license": "ISC", 16 | "dependencies": { 17 | "bluebird": "3.3.4", 18 | "date-fns": "^2.9.0", 19 | "fast-xml-parser": "^4.3.2", 20 | "querystring": "0.2.0", 21 | "request": "2.88.0", 22 | "request-debug": "0.2.0", 23 | "underscore": "1.12.1", 24 | "util": "0.10.3", 25 | "uuid": "^8.3.2" 26 | }, 27 | "devDependencies": { 28 | "async": "0.9.0", 29 | "bluebird": "2.9.25", 30 | "expect": "0.1.1", 31 | "mocha": "10.1.0", 32 | "ramda": "0.17.1" 33 | }, 34 | "directories": { 35 | "example": "example", 36 | "test": "test" 37 | }, 38 | "repository": { 39 | "type": "git", 40 | "url": "https://github.com/mcohen01/node-quickbooks.git" 41 | }, 42 | "bugs": { 43 | "url": "https://github.com/mcohen01/node-quickbooks/issues" 44 | }, 45 | "homepage": "https://github.com/mcohen01/node-quickbooks" 46 | } 47 | -------------------------------------------------------------------------------- /test/batch.js: -------------------------------------------------------------------------------- 1 | var expect = require('expect'), 2 | async = require('async'), 3 | config = require('../config'), 4 | QuickBooks = require('../index'), 5 | qbo = new QuickBooks(config); 6 | 7 | 8 | describe('Batch Api', function() { 9 | 10 | this.timeout(30000); 11 | 12 | it('should create 25 Attachables in one batch', function(done) { 13 | async.series([function(cb) { 14 | var items = [] 15 | for (var i = 0; i < 25; i++) { 16 | items.push({ 17 | Attachable: { 18 | Note: 'Test Attachable ' + i, 19 | Tag: 'Testing' 20 | } 21 | }) 22 | } 23 | qbo.batch(items, function(err, batchResponse) { 24 | expect(err).toBe(null) 25 | expect(batchResponse.BatchItemResponse.length).toBe(25) 26 | batchResponse.BatchItemResponse.forEach(function(att) { 27 | expect(att.Fault).toBe(undefined) 28 | expect(att.Attachable.Tag).toBe('Testing') 29 | }) 30 | cb() 31 | }) 32 | }, function(cb) { 33 | qbo.findAttachables({Tag: 'Testing'}, function(err, attachables) { 34 | expect(err).toBe(null) 35 | expect(attachables.Fault).toBe(undefined) 36 | expect(attachables.QueryResponse.Attachable.length).toBe(25) 37 | async.each(attachables.QueryResponse.Attachable, function(attached, callback) { 38 | qbo.deleteAttachable(attached, function(e, d) { 39 | callback() 40 | }) 41 | }, function() { 42 | cb() 43 | }) 44 | }) 45 | }], function(e, r) { 46 | done() 47 | }) 48 | }) 49 | 50 | }) -------------------------------------------------------------------------------- /test/cdc.js: -------------------------------------------------------------------------------- 1 | var expect = require('expect'), 2 | async = require('async'), 3 | moment = require('moment'), 4 | config = require('../config'), 5 | QuickBooks = require('../index'), 6 | qbo = new QuickBooks(config); 7 | 8 | 9 | describe('Change Data Capture', function() { 10 | 11 | this.timeout(15000); 12 | 13 | it('should create an Attachable and capture the change', function(done) { 14 | 15 | async.series([function(cb) { 16 | qbo.createAttachable({Note: 'CDC Attachable', Tag: 'Testing'}, function(err, attachable) { 17 | expect(err).toBe(null) 18 | expect(attachable.Fault).toBe(undefined) 19 | expect(attachable.Note).toBe('CDC Attachable') 20 | cb() 21 | }) 22 | }, function(cb) { 23 | qbo.changeDataCapture(['Attachable'], moment().subtract(1, 'm'), function(err, data) { 24 | expect(err).toBe(null) 25 | expect(data.Fault).toBe(undefined) 26 | expect(data.CDCResponse[0].QueryResponse[0].Attachable[0].Tag).toBe('Testing') 27 | var att = data.CDCResponse[0].QueryResponse[0].Attachable[0] 28 | qbo.deleteAttachable(att, function(e, d) { 29 | expect(e).toBe(null) 30 | expect(d.Fault).toBe(undefined) 31 | cb() 32 | }) 33 | }) 34 | }], function(e, r) { 35 | done() 36 | }) 37 | 38 | }) 39 | 40 | }) -------------------------------------------------------------------------------- /test/charge.js: -------------------------------------------------------------------------------- 1 | var util = require('util'), 2 | expect = require('expect'), 3 | async = require('async'), 4 | config = require('../config'), 5 | QuickBooks = require('../index'), 6 | qbo = new QuickBooks(config); 7 | 8 | describe('Charge Api', function() { 9 | 10 | this.timeout(15000); 11 | 12 | it('should create a Charge, get a charge, capture, and refund', function(done) { 13 | 14 | var card = { 15 | name: 'Brad Smith', 16 | card: { 17 | cvc: '123', 18 | number: '4111111111111111', 19 | expYear: '2016', 20 | expMonth: '02', 21 | address: { 22 | region: 'CA', 23 | postalCode: '94062', 24 | streetAddress: '131 Fairy Lane', 25 | country: 'US', 26 | city: 'Sunnyvale' 27 | } 28 | } 29 | } 30 | 31 | var token, chargeId, refundId 32 | async.series([function(cb) { 33 | qbo.cardToken(card, function(err, cardToken) { 34 | token = cardToken.value 35 | cb() 36 | }) 37 | }, function(cb) { 38 | qbo.charge({ 39 | "amount": "42.21", 40 | "token": token, 41 | "currency": "USD" 42 | }, function(err, charged) { 43 | expect(err).toBe(null) 44 | expect(charged.errors).toBe(undefined) 45 | expect(charged.amount).toBe(42.21) 46 | expect(charged.card.token).toExist() 47 | expect(charged.card.id).toExist() 48 | expect(charged.card.authCode).toExist() 49 | chargeId = charged.id 50 | cb() 51 | }) 52 | }, function(cb) { 53 | qbo.getCharge(chargeId, function(err, charge) { 54 | expect(err).toBe(null) 55 | expect(charge.errors).toBe(undefined) 56 | expect(charge.status.toUpperCase()).toBe('AUTHORIZED') 57 | expect(charge.amount).toBe(42.21) 58 | expect(charge.card.number).toBe('xxxxxxxxxxxx1111') 59 | expect(charge.card.name).toBe('Brad Smith') 60 | cb() 61 | }) 62 | }, function(cb) { 63 | qbo.capture(chargeId, { 64 | amount: 42.21 65 | }, function(err, capture) { 66 | expect(err).toBe(null) 67 | expect(capture.errors).toBe(undefined) 68 | expect(capture.amount).toBe(42.21) 69 | cb() 70 | }) 71 | }, function(cb) { 72 | charge.capture = true 73 | qbo.charge(charge, function(err, charged) { 74 | expect(err).toBe(null) 75 | expect(charged.errors).toBe(undefined) 76 | expect(charged.amount).toBe(42.21) 77 | expect(charged.card.number).toBe('xxxxxxxxxxxx1111') 78 | expect(charged.card.name).toBe('Brad Smith') 79 | chargeId = charged.id 80 | cb() 81 | }) 82 | },function(cb) { 83 | qbo.refund(chargeId, {amount: 42.21}, function(err, refund) { 84 | expect(err).toBe(null) 85 | expect(refund.errors).toBe(undefined) 86 | expect(refund.amount).toBe(42.21) 87 | refundId = refund.id 88 | cb() 89 | }) 90 | },function(cb) { 91 | qbo.getRefund(chargeId, refundId, function(err, refund) { 92 | expect(err).toBe(null) 93 | expect(refund.errors).toBe(undefined) 94 | expect(refund.id).toBe(refundId) 95 | expect(refund.amount).toBe(42.21) 96 | expect(refund.context).toBeA(Object) 97 | cb() 98 | }) 99 | }], function(e, r) { 100 | done() 101 | }) 102 | 103 | }) 104 | 105 | }) -------------------------------------------------------------------------------- /test/index.js: -------------------------------------------------------------------------------- 1 | var os = require('os'), 2 | fs = require('fs'), 3 | util = require('util'), 4 | expect = require('expect'), 5 | async = require('async'), 6 | _ = require('underscore'), 7 | config = require('../config'), 8 | QuickBooks = require('../index'), 9 | qbo = new QuickBooks(config); 10 | 11 | 12 | describe('Attachable CRUDQ', function() { 13 | 14 | this.timeout(15000); 15 | 16 | it('should CRUDQ an Attachable', function(done) { 17 | var _attach; 18 | async.series([function(cb) { 19 | qbo.createAttachable({Note: 'My File'}, function(err, attach) { 20 | expect(err).toBe(null) 21 | expect(attach.Fault).toBe(undefined) 22 | expect(attach.Note).toBe('My File') 23 | _attach = attach 24 | cb() 25 | }) 26 | }, function(cb) { 27 | qbo.getAttachable(_attach.Id, function(err, attachable) { 28 | expect(err).toBe(null) 29 | expect(attachable.Fault).toBe(undefined) 30 | expect(attachable.Note).toBe('My File') 31 | attachable.Note = 'My Updated File' 32 | _attach = attachable 33 | cb() 34 | }) 35 | }, function(cb) { 36 | qbo.updateAttachable(_attach, function(err, updated) { 37 | expect(err).toBe(null) 38 | expect(updated.Fault).toBe(undefined) 39 | expect(updated.Note).toBe('My Updated File') 40 | cb() 41 | }) 42 | }, function(cb) { 43 | qbo.findAttachables(function(err, list) { 44 | expect(err).toBe(null) 45 | expect(list.Fault).toBe(undefined) 46 | expect(list.QueryResponse.Attachable.length).toBeGreaterThan(0) 47 | expect(list.QueryResponse.Attachable[0].Note).toBe('My Updated File') 48 | cb() 49 | }) 50 | }, function(cb) { 51 | qbo.deleteAttachable(_attach.Id, function(err, deleted) { 52 | expect(err).toBe(null) 53 | expect(deleted.Fault).toBe(undefined) 54 | expect(deleted.Attachable.status).toBe('Deleted') 55 | cb() 56 | }) 57 | }, function(cb) { 58 | qbo.findAttachables(function(err, list) { 59 | expect(err).toBe(null) 60 | expect(list.Fault).toBe(undefined) 61 | expect(JSON.stringify(list.QueryResponse)).toBe('{}') 62 | cb() 63 | }) 64 | }], function(e, r) { done() }) 65 | }) 66 | 67 | }) 68 | 69 | 70 | describe('Query', function() { 71 | 72 | this.timeout(15000); 73 | 74 | it('should fetch Accounts', function (done) { 75 | qbo.findAccounts(function(err, accounts) { 76 | expect(err).toBe(null) 77 | expect(accounts.Fault).toBe(undefined) 78 | expect(accounts.QueryResponse.Account.length).toBeGreaterThan(20) 79 | done() 80 | }) 81 | }) 82 | 83 | it('should fetch Expense Accounts by AccountType', function (done) { 84 | qbo.findAccounts({AccountType: 'Expense'}, function(err, accounts) { 85 | expect(err).toBe(null) 86 | expect(accounts.Fault).toBe(undefined) 87 | expect(accounts.QueryResponse.Account.length).toBeGreaterThan(0) 88 | expect(accounts.QueryResponse.Account[0].AccountType).toBe('Expense') 89 | done() 90 | }) 91 | }) 92 | 93 | it('should fetch the Travel Account', function (done) { 94 | qbo.findAccounts({Name: 'Travel'}, function(err, accounts) { 95 | expect(err).toBe(null) 96 | expect(accounts.Fault).toBe(undefined) 97 | expect(accounts.QueryResponse.Account.length).toBe(1) 98 | expect(accounts.QueryResponse.Account[0].AccountType).toBe('Expense') 99 | done() 100 | }) 101 | }) 102 | 103 | var queries = fs.readFileSync('build/query.txt').toString('utf-8').split(os.EOL) 104 | queries.forEach(function(q) { 105 | it('should fetch ' + qbo.capitalize(q), function (done) { 106 | qbo['find' + qbo.pluralize(qbo.capitalize(q))].call(qbo, function(err, data) { 107 | expect(err).toBe(null) 108 | expect(data.Fault).toBe(undefined) 109 | expect(_.isObject(data.QueryResponse)).toBe(true) 110 | done() 111 | }) 112 | }) 113 | }) 114 | 115 | }) 116 | 117 | 118 | describe('Reports', function() { 119 | 120 | this.timeout(30000); 121 | 122 | var reports = fs.readFileSync('build/report.txt').toString('utf-8').split(os.EOL) 123 | reports.some(function (line) { 124 | if (line === '') return true 125 | it('should fetch ' + line + ' Report', function (done) { 126 | qbo['report' + line].call(qbo, function(err, report) { 127 | expect(err).toBe(null) 128 | expect(report.Fault).toBe(undefined) 129 | done() 130 | }) 131 | }) 132 | }) 133 | 134 | }) 135 | 136 | 137 | describe('SalesReceipt', function() { 138 | 139 | this.timeout(30000); 140 | 141 | it('should create a new SalesReceipt', function (done) { 142 | qbo.createSalesReceipt({ 143 | DocNumber: "1044", 144 | TxnDate: "2014-08-04", 145 | PrivateNote: "Memo for SalesReceipt", 146 | CustomerMemo: { value: "my message"} , 147 | Line: [ 148 | { 149 | Description: "Line description", 150 | Amount: 14, 151 | DetailType: "SalesItemLineDetail", 152 | SalesItemLineDetail: { 153 | ServiceDate: "2014-08-14", 154 | UnitPrice: 14, 155 | Qty: 1, 156 | TaxCodeRef: {value: "TAX"} 157 | } 158 | }, 159 | { 160 | Amount: 0.28, 161 | DetailType: "DiscountLineDetail", 162 | DiscountLineDetail: { 163 | PercentBased: true, 164 | DiscountPercent: 2 165 | } 166 | } 167 | ]}, function(err, salesReceipt) { 168 | expect(err).toBe(null) 169 | expect(salesReceipt.Fault).toBe(undefined) 170 | async.series([function(cb) { 171 | qbo.sendSalesReceiptPdf(salesReceipt.Id, config.testEmail, function(err, data) { 172 | console.log(util.inspect(data, {showHidden: false, depth: null})); 173 | cb() 174 | }) 175 | }, function(cb) { 176 | qbo.getSalesReceiptPdf(salesReceipt.Id, function(err, data) { 177 | fs.writeFileSync('salesReceipt_'+salesReceipt.Id+'.pdf',data); 178 | console.log(util.inspect(data, {showHidden: false, depth: null})); 179 | cb() 180 | }) 181 | }],function(e, r) { done() }) 182 | }) 183 | }) 184 | 185 | it('should fetch and delete all SalesReceipts', function (done) { 186 | qbo.findSalesReceipts(function(err, items) { 187 | var deletes = [] 188 | if (items.QueryResponse.SalesReceipt) { 189 | items.QueryResponse.SalesReceipt.forEach(function (e) { 190 | deletes.push(function(cb) { 191 | qbo.deleteSalesReceipt(e.Id, cb) 192 | }) 193 | }) 194 | } else { 195 | done() 196 | } 197 | async.series(deletes, function(e, r) { done() }) 198 | }) 199 | }) 200 | 201 | }) 202 | --------------------------------------------------------------------------------