conductor-node 11.5.2 → 11.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -21
- package/dist/package.json +1 -1
- package/dist/src/integrations/qbd/QbdIntegration.d.ts +105 -10
- package/dist/src/integrations/qbd/QbdIntegration.js +105 -10
- package/dist/src/integrations/qbd/qbdTypes.d.ts +128 -22
- package/dist/src/interceptors/logging.d.ts +10 -3
- package/dist/src/interceptors/logging.js +14 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
<!-- markdownlint-disable MD033 MD041 -->
|
|
2
2
|
<div align="center">
|
|
3
|
-
<
|
|
3
|
+
<a href="https://conductor.is">
|
|
4
|
+
<picture>
|
|
5
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/conductor-is/quickbooks-desktop-api/assets/170023/162ee6a9-75ac-41e9-9f1e-2ecc1d88f841">
|
|
6
|
+
<img alt="Conductor logo" src="https://github.com/conductor-is/quickbooks-desktop-api/assets/170023/d67464b8-53a7-4d33-afeb-05a2efde1fa8" width="325">
|
|
7
|
+
</picture>
|
|
8
|
+
</a>
|
|
4
9
|
<h3>QuickBooks Desktop API for Node.js, TypeScript, and REST</h3>
|
|
5
|
-
<a href="https://npmjs.com/package/conductor-node"><img src="https://img.shields.io/npm/dm/conductor-node.svg?logo=npm" alt="NPM download count"></a>
|
|
6
|
-
<a href="https://npmjs.org/package/conductor-node"><img src="https://img.shields.io/npm/v/conductor-node.svg?logo=npm" alt="Package version"></a>
|
|
7
|
-
<img src="https://img.shields.io/badge/coverage-100%25-brightgreen" alt="Code coverage">
|
|
8
|
-
<img src="https://img.shields.io/badge/CI-passing-brightgreen?logo=github" alt="CI status">
|
|
9
|
-
<a href="LICENSE"><img src="https://img.shields.io/npm/l/conductor-node.svg?color=blue&logo=github" alt="License" /></a>
|
|
10
|
-
<br />
|
|
11
|
-
<br />
|
|
12
10
|
<a href="https://docs.conductor.is/overview/quickstart">Quickstart</a>
|
|
13
11
|
<span> • </span>
|
|
14
12
|
<a href="https://conductor.is">Website</a>
|
|
@@ -16,36 +14,46 @@
|
|
|
16
14
|
<a href="https://docs.conductor.is">Docs</a>
|
|
17
15
|
<span> • </span>
|
|
18
16
|
<a href="https://docs.conductor.is/qbd-examples">Examples</a>
|
|
17
|
+
<span> • </span>
|
|
18
|
+
<a href="https://twitter.com/conductor_is">Twitter</a>
|
|
19
|
+
<br />
|
|
19
20
|
<br />
|
|
21
|
+
<a href="https://npmjs.com/package/conductor-node"><img src="https://img.shields.io/npm/dm/conductor-node.svg?logo=npm" alt="NPM download count"></a>
|
|
22
|
+
<a href="https://npmjs.org/package/conductor-node"><img src="https://img.shields.io/npm/v/conductor-node.svg?logo=npm" alt="Package version"></a>
|
|
23
|
+
<img src="https://img.shields.io/badge/coverage-100%25-brightgreen" alt="Code coverage">
|
|
24
|
+
<a href="LICENSE"><img src="https://img.shields.io/npm/l/conductor-node.svg?color=blue&logo=github" alt="License" /></a>
|
|
20
25
|
<hr />
|
|
21
26
|
</div>
|
|
22
27
|
|
|
23
28
|
## What is Conductor?
|
|
24
29
|
|
|
25
|
-
Conductor is a
|
|
26
|
-
|
|
27
|
-
We also offer a [REST API](https://docs.conductor.is/qbd/rest).
|
|
30
|
+
Conductor is a real-time, fully-typed API for **QuickBooks Desktop** (sometimes called QuickBooks Enterprise), available via TypeScript, Node.js, and REST. In just a few lines, get real-time access to fetch, create, or update [_any_ QuickBooks Desktop object type](https://docs.conductor.is/qbd/api#supported-object-types) and receive a fully-typed response. Check out [the documentation](https://docs.conductor.is) to get started.
|
|
28
31
|
|
|
29
32
|
Conductor, the company, is building a data integration platform for vertical SaaS companies, starting with QuickBooks Desktop. Our team has spent over a decade building companies, scaling vast software systems, and obsessing over quality.
|
|
30
33
|
|
|
31
34
|
<!-- markdownlint-disable MD033 -->
|
|
32
35
|
<div align="center">
|
|
33
|
-
<a href="https://docs.conductor.is"><img src="https://user-images.githubusercontent.com/170023/213273732-83dd6881-0b36-4787-820b-bd55cdc8444f.jpg" alt="QuickBooks Desktop autocomplete" width="600" /></a>
|
|
36
|
+
<a href="https://docs.conductor.is"><img src="https://user-images.githubusercontent.com/170023/213273732-83dd6881-0b36-4787-820b-bd55cdc8444f.jpg" alt="QuickBooks Desktop autocomplete" width="600" style="border-radius: 20px;" /></a>
|
|
34
37
|
</div>
|
|
35
38
|
|
|
36
|
-
##
|
|
39
|
+
## What is this repo?
|
|
37
40
|
|
|
38
|
-
|
|
39
|
-
2. [Quickstart](https://docs.conductor.is/overview/quickstart)
|
|
40
|
-
3. [QuickBooks Desktop APIs](https://docs.conductor.is/qbd/api)
|
|
41
|
-
4. [API Reference](https://docs.conductor.is/apis)
|
|
42
|
-
5. [Error Handling](https://docs.conductor.is/usage/error-handling)
|
|
41
|
+
This repository is a library for conveniently accessing Conductor's QuickBooks Desktop API from TypeScript or JavaScript. The library is a wrapper around the Conductor REST API, providing a fully-typed, easy-to-use interface for fetching, creating, and updating QuickBooks Desktop objects.
|
|
43
42
|
|
|
44
43
|
## Requirements
|
|
45
44
|
|
|
46
|
-
1. A Conductor API key pair: one secret key, one publishable key. Please [
|
|
45
|
+
1. A Conductor API key pair: one secret key, one publishable key. **Please [sign up to join the beta](https://73a5v9t55ed.typeform.com/to/VRX7rfrN).**
|
|
47
46
|
2. Node.js v16 or later.
|
|
48
47
|
|
|
48
|
+
## Documentation
|
|
49
|
+
|
|
50
|
+
1. [Get Started](https://docs.conductor.is/overview/get-started)
|
|
51
|
+
2. [Quickstart](https://docs.conductor.is/overview/quickstart)
|
|
52
|
+
3. [Node.js / TypeScript API](https://docs.conductor.is/qbd/api)
|
|
53
|
+
4. [REST API](https://docs.conductor.is/qbd/rest)
|
|
54
|
+
5. [API Reference](https://docs.conductor.is/apis)
|
|
55
|
+
6. [Error Handling](https://docs.conductor.is/usage/error-handling)
|
|
56
|
+
|
|
49
57
|
## Installation
|
|
50
58
|
|
|
51
59
|
```sh
|
|
@@ -80,13 +88,13 @@ async function main() {
|
|
|
80
88
|
console.log("Complete the QuickBooks Desktop auth:", authSession.authFlowUrl);
|
|
81
89
|
|
|
82
90
|
// 3. Get a list of all Customers from QuickBooks Desktop for this EndUser.
|
|
83
|
-
const qbdCustomers = await conductor.qbd.
|
|
91
|
+
const qbdCustomers = await conductor.qbd.customer.query(endUser.id);
|
|
84
92
|
console.log("QuickBooks Desktop customers:", qbdCustomers);
|
|
85
93
|
}
|
|
86
94
|
|
|
87
95
|
main();
|
|
88
96
|
```
|
|
89
97
|
|
|
90
|
-
## More
|
|
98
|
+
## More documentation
|
|
91
99
|
|
|
92
100
|
Please see our [full documentation site](https://docs.conductor.is) for more docs, guides, and code examples.
|
package/dist/package.json
CHANGED
|
@@ -127,7 +127,7 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
127
127
|
* Provides functionality found in the Find/Advanced-Find window to find
|
|
128
128
|
* bills that are to be paid by check. The Find/Advanced-Find windows can be
|
|
129
129
|
* reached by clicking the Find button on the main QuickBooks menubar, by
|
|
130
|
-
* selecting Edit->Find, or simply by using the shortcut CTRL-F. Notice that
|
|
130
|
+
* selecting "Edit" -> "Find", or simply by using the shortcut CTRL-F. Notice that
|
|
131
131
|
* you can use the `metaData` attribute inside the query tag if you want
|
|
132
132
|
* only a count of the bills that will be returned from the query. If you
|
|
133
133
|
* know the bill’s transaction ID or reference number, you could use these,
|
|
@@ -209,6 +209,8 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
209
209
|
*/
|
|
210
210
|
billPaymentCheck: {
|
|
211
211
|
/**
|
|
212
|
+
* Adds a bill payment check.
|
|
213
|
+
*
|
|
212
214
|
* A `BillPaymentCheckAdd` request must include either `PaymentAmount`,
|
|
213
215
|
* `SetCredit`, or `DiscountAmount` (or more than one of these). If none of
|
|
214
216
|
* these three is included, the SDK will return an error.
|
|
@@ -220,18 +222,21 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
220
222
|
* `AppliedAmount` field.
|
|
221
223
|
*
|
|
222
224
|
* `BillPaymentCheckAdd` provides the functionality found in the Pay Bills
|
|
223
|
-
* form in the QuickBooks UI. You can reach this form by selecting
|
|
224
|
-
* ->
|
|
225
|
+
* form in the QuickBooks UI. You can reach this form by selecting
|
|
226
|
+
* Retail->Pay Bills from the main QuickBooks menubar. `BillPayment` is
|
|
225
227
|
* described in detail in the chapter on handling receive payment and bill
|
|
226
|
-
* payment in the QB SDK Programmer’s Guide. Notice that
|
|
227
|
-
* one
|
|
228
|
-
*
|
|
228
|
+
* payment in the QB SDK Programmer’s Guide. Notice that the request
|
|
229
|
+
* requires one (but not more than one!) `BillPaymentCheckAdd` sub
|
|
230
|
+
* aggregate, which is provided to support the SDK macro feature in this
|
|
231
|
+
* request. Notice that you can supply only one of these sub aggregates in
|
|
232
|
+
* the request. If you want to pay multiple bills, you must issue a separate
|
|
233
|
+
* request for each bill pay.
|
|
229
234
|
*
|
|
230
235
|
* If you are using more than one A/P account, make sure that the
|
|
231
236
|
* `APAccountRef` in the `BillPaymentCheckAdd` matches the `APAccountRef`
|
|
232
|
-
* that was used when the Bill was originally added. That is, the Bill
|
|
233
|
-
* entered in a particular account payable: use that same account
|
|
234
|
-
* when you pay the bill using this request.
|
|
237
|
+
* that was used when the `Bill` was originally added. That is, the `Bill`
|
|
238
|
+
* was entered in a particular account payable: use that same account
|
|
239
|
+
* payable when you pay the bill using this request.
|
|
235
240
|
*
|
|
236
241
|
* Notice that although you can set the `IsToBePrinted` flag, you cannot
|
|
237
242
|
* print checks using the SDK.
|
|
@@ -290,10 +295,13 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
290
295
|
*/
|
|
291
296
|
mod: (endUserId: string, params: QbdTypes.BillPaymentCheckModRq["BillPaymentCheckMod"]) => Promise<NonNullable<QbdTypes.BillPaymentCheckModRs["BillPaymentCheckRet"]>>;
|
|
292
297
|
/**
|
|
298
|
+
* Returns bill payment check transactions based on the supplied query
|
|
299
|
+
* criteria.
|
|
300
|
+
*
|
|
293
301
|
* Provides functionality found in the Find/Advanced-Find window to find
|
|
294
302
|
* bill payments paid by check. The Find/Advanced-Find windows can be
|
|
295
303
|
* reached by clicking the Find button on the main QuickBooks menubar, by
|
|
296
|
-
* selecting Edit->Find, or simply by using the shortcut CTRL-F. Notice that
|
|
304
|
+
* selecting "Edit" -> "Find", or simply by using the shortcut CTRL-F. Notice that
|
|
297
305
|
* you can use the `metaData` attribute inside the query tag if you want
|
|
298
306
|
* only a count of the bill payments that will be returned from the query.
|
|
299
307
|
*
|
|
@@ -324,6 +332,93 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
324
332
|
*/
|
|
325
333
|
query: (endUserId: string, params?: QbdTypes.BillPaymentCheckQueryRq) => Promise<NonNullable<QbdTypes.BillPaymentCheckQueryRs["BillPaymentCheckRet"]>>;
|
|
326
334
|
};
|
|
335
|
+
/**
|
|
336
|
+
* A bill payment credit card is a transaction that represents a payment by
|
|
337
|
+
* credit card for a bill.
|
|
338
|
+
*/
|
|
339
|
+
billPaymentCreditCard: {
|
|
340
|
+
/**
|
|
341
|
+
* Adds a bill payment credit card.
|
|
342
|
+
*
|
|
343
|
+
* A `BillPaymentCreditCardAdd` request must include either `PaymentAmount`,
|
|
344
|
+
* `SetCredit`, or `DiscountAmount` (or more than one of these). If none of
|
|
345
|
+
* these three is included, the SDK will return an error.
|
|
346
|
+
*
|
|
347
|
+
* `BillPaymentCreditCardAdd` provides functionality found in the Pay Bills
|
|
348
|
+
* form in the QuickBooks UI. You can reach this form by selecting "Retail"
|
|
349
|
+
* -> "Pay Bills" from the main QuickBooks menubar. `BillPayment` is
|
|
350
|
+
* described in detail in the chapter on handling receive payment and bill
|
|
351
|
+
* payment in the QB SDK Programmer’s Guide. Notice that the request
|
|
352
|
+
* requires one (but not more than one!) `BillPaymentCreditCardAdd`
|
|
353
|
+
* sub-aggregate. Notice that you can supply only one of these
|
|
354
|
+
* sub-aggregates in the request. If you want to pay multiple bills, you
|
|
355
|
+
* must issue a separate request for each bill pay.
|
|
356
|
+
*
|
|
357
|
+
* If you are using more than one A/P account, make sure that the
|
|
358
|
+
* `APAccountRef` in the `BillPaymentCreditCardAdd` matches the
|
|
359
|
+
* `APAccountRef` that was used when the `Bill` was originally added. That
|
|
360
|
+
* is, the `Bill` was entered in a particular account payable: use that same
|
|
361
|
+
* account payable when you pay the bill using this request.
|
|
362
|
+
*
|
|
363
|
+
* Notice that although you can set the `IsToBePrinted` flag, you cannot
|
|
364
|
+
* print checks using the SDK.
|
|
365
|
+
*
|
|
366
|
+
* Finally, notice that it is possible to issue this request using only
|
|
367
|
+
* `SetCredit` to apply an existing credit to the bill. However, if you do
|
|
368
|
+
* this, you should be aware that no transaction ID is generated. The credit
|
|
369
|
+
* and the bill simply are linked.
|
|
370
|
+
*
|
|
371
|
+
* See more: https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/BillPaymentCreditCardAdd
|
|
372
|
+
*/
|
|
373
|
+
add: (endUserId: string, params: QbdTypes.BillPaymentCreditCardAddRq["BillPaymentCreditCardAdd"]) => Promise<NonNullable<QbdTypes.BillPaymentCreditCardAddRs["BillPaymentCreditCardRet"]>>;
|
|
374
|
+
/**
|
|
375
|
+
* Returns bill payment credit card transactions based on the supplied query
|
|
376
|
+
* criteria.
|
|
377
|
+
*
|
|
378
|
+
* Provides functionality found in the Find/Advanced Find window to find
|
|
379
|
+
* bill payments that were paid by credit card. The Find/Advanced Find
|
|
380
|
+
* windows can be reached by clicking the Find button on the main QuickBooks
|
|
381
|
+
* menubar, by selecting "Edit" -> "Find", or simply by using the shortcut
|
|
382
|
+
* CTRL-F. Notice that you can use the metaData attribute inside the query
|
|
383
|
+
* tag if you want only a count of the bill payments that will be returned
|
|
384
|
+
* from the query.
|
|
385
|
+
*
|
|
386
|
+
* If you know the bill’s transaction ID or reference number, you could use
|
|
387
|
+
* these, or search by transaction date, or search by the date where the
|
|
388
|
+
* bill was last modified.
|
|
389
|
+
*
|
|
390
|
+
* Important: If you made a bill payment by credit card, and ONLY applied a
|
|
391
|
+
* credit using `SetCredit` (no funds were applied other than the credit),
|
|
392
|
+
* then that payment will not be returned in this query because it is not
|
|
393
|
+
* considered a separate transaction and has no `TxnID`. To get that kind of
|
|
394
|
+
* payment, you must do a `BillQuery` on the original bill and specify
|
|
395
|
+
* `IncludeLinkedTxns`. Any applied credit will be linked directly to the
|
|
396
|
+
* bill.
|
|
397
|
+
*
|
|
398
|
+
* If you need additional filters, you can use the entity filter to search
|
|
399
|
+
* for bills from a specific vendor or vendor sub (using the
|
|
400
|
+
* `ListIDWithChildren` or `FullNameWithChildren` tags). You can also search
|
|
401
|
+
* for bills entered against a particular account (the `APAccountRef`
|
|
402
|
+
* specified in the originating `BillAdd` request). You can specify all
|
|
403
|
+
* subaccounts by using the various *WithChildren tags. For example, to find
|
|
404
|
+
* all bills entered against Checking where you have multiple checking
|
|
405
|
+
* accounts, you would use the `ListIDWithChildren` or
|
|
406
|
+
* `FullNameWithChildren` tags inside your AccountFilter tags. Finally, you
|
|
407
|
+
* can filter on the `RefNumber` or `RefNumber` range. Notice that all of
|
|
408
|
+
* these filters can be used together (ANDed) if desired.
|
|
409
|
+
*
|
|
410
|
+
* To prevent the return of too much data, you can use `MaxReturned` to
|
|
411
|
+
* limit the total number of bills returned from the query. In addition, you
|
|
412
|
+
* can limit the type of data that is returned for each bill, using
|
|
413
|
+
* `IncludeRetElement`.
|
|
414
|
+
*
|
|
415
|
+
* Finally, you can specify whether each bill contains line items using the
|
|
416
|
+
* `IncludeLineItems`, which by default is `False` (no line item data).
|
|
417
|
+
*
|
|
418
|
+
* See more: https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/BillPaymentCreditCardQuery
|
|
419
|
+
*/
|
|
420
|
+
query: (endUserId: string, params?: QbdTypes.BillPaymentCreditCardQueryRq) => Promise<NonNullable<QbdTypes.BillPaymentCreditCardQueryRs["BillPaymentCreditCardRet"]>>;
|
|
421
|
+
};
|
|
327
422
|
/**
|
|
328
423
|
* A build assembly represents an inventory item created from other inventory
|
|
329
424
|
* items or assemblies.
|
|
@@ -132,7 +132,7 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
132
132
|
* Provides functionality found in the Find/Advanced-Find window to find
|
|
133
133
|
* bills that are to be paid by check. The Find/Advanced-Find windows can be
|
|
134
134
|
* reached by clicking the Find button on the main QuickBooks menubar, by
|
|
135
|
-
* selecting Edit->Find, or simply by using the shortcut CTRL-F. Notice that
|
|
135
|
+
* selecting "Edit" -> "Find", or simply by using the shortcut CTRL-F. Notice that
|
|
136
136
|
* you can use the `metaData` attribute inside the query tag if you want
|
|
137
137
|
* only a count of the bills that will be returned from the query. If you
|
|
138
138
|
* know the bill’s transaction ID or reference number, you could use these,
|
|
@@ -214,6 +214,8 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
214
214
|
*/
|
|
215
215
|
billPaymentCheck = {
|
|
216
216
|
/**
|
|
217
|
+
* Adds a bill payment check.
|
|
218
|
+
*
|
|
217
219
|
* A `BillPaymentCheckAdd` request must include either `PaymentAmount`,
|
|
218
220
|
* `SetCredit`, or `DiscountAmount` (or more than one of these). If none of
|
|
219
221
|
* these three is included, the SDK will return an error.
|
|
@@ -225,18 +227,21 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
225
227
|
* `AppliedAmount` field.
|
|
226
228
|
*
|
|
227
229
|
* `BillPaymentCheckAdd` provides the functionality found in the Pay Bills
|
|
228
|
-
* form in the QuickBooks UI. You can reach this form by selecting
|
|
229
|
-
* ->
|
|
230
|
+
* form in the QuickBooks UI. You can reach this form by selecting
|
|
231
|
+
* Retail->Pay Bills from the main QuickBooks menubar. `BillPayment` is
|
|
230
232
|
* described in detail in the chapter on handling receive payment and bill
|
|
231
|
-
* payment in the QB SDK Programmer’s Guide. Notice that
|
|
232
|
-
* one
|
|
233
|
-
*
|
|
233
|
+
* payment in the QB SDK Programmer’s Guide. Notice that the request
|
|
234
|
+
* requires one (but not more than one!) `BillPaymentCheckAdd` sub
|
|
235
|
+
* aggregate, which is provided to support the SDK macro feature in this
|
|
236
|
+
* request. Notice that you can supply only one of these sub aggregates in
|
|
237
|
+
* the request. If you want to pay multiple bills, you must issue a separate
|
|
238
|
+
* request for each bill pay.
|
|
234
239
|
*
|
|
235
240
|
* If you are using more than one A/P account, make sure that the
|
|
236
241
|
* `APAccountRef` in the `BillPaymentCheckAdd` matches the `APAccountRef`
|
|
237
|
-
* that was used when the Bill was originally added. That is, the Bill
|
|
238
|
-
* entered in a particular account payable: use that same account
|
|
239
|
-
* when you pay the bill using this request.
|
|
242
|
+
* that was used when the `Bill` was originally added. That is, the `Bill`
|
|
243
|
+
* was entered in a particular account payable: use that same account
|
|
244
|
+
* payable when you pay the bill using this request.
|
|
240
245
|
*
|
|
241
246
|
* Notice that although you can set the `IsToBePrinted` flag, you cannot
|
|
242
247
|
* print checks using the SDK.
|
|
@@ -295,10 +300,13 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
295
300
|
*/
|
|
296
301
|
mod: async (endUserId, params) => this.sendRequestWrapper(endUserId, { BillPaymentCheckModRq: { BillPaymentCheckMod: params } }, "BillPaymentCheckModRs", "BillPaymentCheckRet"),
|
|
297
302
|
/**
|
|
303
|
+
* Returns bill payment check transactions based on the supplied query
|
|
304
|
+
* criteria.
|
|
305
|
+
*
|
|
298
306
|
* Provides functionality found in the Find/Advanced-Find window to find
|
|
299
307
|
* bill payments paid by check. The Find/Advanced-Find windows can be
|
|
300
308
|
* reached by clicking the Find button on the main QuickBooks menubar, by
|
|
301
|
-
* selecting Edit->Find, or simply by using the shortcut CTRL-F. Notice that
|
|
309
|
+
* selecting "Edit" -> "Find", or simply by using the shortcut CTRL-F. Notice that
|
|
302
310
|
* you can use the `metaData` attribute inside the query tag if you want
|
|
303
311
|
* only a count of the bill payments that will be returned from the query.
|
|
304
312
|
*
|
|
@@ -329,6 +337,93 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
329
337
|
*/
|
|
330
338
|
query: async (endUserId, params = {}) => this.sendRequestWrapper(endUserId, { BillPaymentCheckQueryRq: params }, "BillPaymentCheckQueryRs", "BillPaymentCheckRet"),
|
|
331
339
|
};
|
|
340
|
+
/**
|
|
341
|
+
* A bill payment credit card is a transaction that represents a payment by
|
|
342
|
+
* credit card for a bill.
|
|
343
|
+
*/
|
|
344
|
+
billPaymentCreditCard = {
|
|
345
|
+
/**
|
|
346
|
+
* Adds a bill payment credit card.
|
|
347
|
+
*
|
|
348
|
+
* A `BillPaymentCreditCardAdd` request must include either `PaymentAmount`,
|
|
349
|
+
* `SetCredit`, or `DiscountAmount` (or more than one of these). If none of
|
|
350
|
+
* these three is included, the SDK will return an error.
|
|
351
|
+
*
|
|
352
|
+
* `BillPaymentCreditCardAdd` provides functionality found in the Pay Bills
|
|
353
|
+
* form in the QuickBooks UI. You can reach this form by selecting "Retail"
|
|
354
|
+
* -> "Pay Bills" from the main QuickBooks menubar. `BillPayment` is
|
|
355
|
+
* described in detail in the chapter on handling receive payment and bill
|
|
356
|
+
* payment in the QB SDK Programmer’s Guide. Notice that the request
|
|
357
|
+
* requires one (but not more than one!) `BillPaymentCreditCardAdd`
|
|
358
|
+
* sub-aggregate. Notice that you can supply only one of these
|
|
359
|
+
* sub-aggregates in the request. If you want to pay multiple bills, you
|
|
360
|
+
* must issue a separate request for each bill pay.
|
|
361
|
+
*
|
|
362
|
+
* If you are using more than one A/P account, make sure that the
|
|
363
|
+
* `APAccountRef` in the `BillPaymentCreditCardAdd` matches the
|
|
364
|
+
* `APAccountRef` that was used when the `Bill` was originally added. That
|
|
365
|
+
* is, the `Bill` was entered in a particular account payable: use that same
|
|
366
|
+
* account payable when you pay the bill using this request.
|
|
367
|
+
*
|
|
368
|
+
* Notice that although you can set the `IsToBePrinted` flag, you cannot
|
|
369
|
+
* print checks using the SDK.
|
|
370
|
+
*
|
|
371
|
+
* Finally, notice that it is possible to issue this request using only
|
|
372
|
+
* `SetCredit` to apply an existing credit to the bill. However, if you do
|
|
373
|
+
* this, you should be aware that no transaction ID is generated. The credit
|
|
374
|
+
* and the bill simply are linked.
|
|
375
|
+
*
|
|
376
|
+
* See more: https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/BillPaymentCreditCardAdd
|
|
377
|
+
*/
|
|
378
|
+
add: async (endUserId, params) => this.sendRequestWrapper(endUserId, { BillPaymentCreditCardAddRq: { BillPaymentCreditCardAdd: params } }, "BillPaymentCreditCardAddRs", "BillPaymentCreditCardRet"),
|
|
379
|
+
/**
|
|
380
|
+
* Returns bill payment credit card transactions based on the supplied query
|
|
381
|
+
* criteria.
|
|
382
|
+
*
|
|
383
|
+
* Provides functionality found in the Find/Advanced Find window to find
|
|
384
|
+
* bill payments that were paid by credit card. The Find/Advanced Find
|
|
385
|
+
* windows can be reached by clicking the Find button on the main QuickBooks
|
|
386
|
+
* menubar, by selecting "Edit" -> "Find", or simply by using the shortcut
|
|
387
|
+
* CTRL-F. Notice that you can use the metaData attribute inside the query
|
|
388
|
+
* tag if you want only a count of the bill payments that will be returned
|
|
389
|
+
* from the query.
|
|
390
|
+
*
|
|
391
|
+
* If you know the bill’s transaction ID or reference number, you could use
|
|
392
|
+
* these, or search by transaction date, or search by the date where the
|
|
393
|
+
* bill was last modified.
|
|
394
|
+
*
|
|
395
|
+
* Important: If you made a bill payment by credit card, and ONLY applied a
|
|
396
|
+
* credit using `SetCredit` (no funds were applied other than the credit),
|
|
397
|
+
* then that payment will not be returned in this query because it is not
|
|
398
|
+
* considered a separate transaction and has no `TxnID`. To get that kind of
|
|
399
|
+
* payment, you must do a `BillQuery` on the original bill and specify
|
|
400
|
+
* `IncludeLinkedTxns`. Any applied credit will be linked directly to the
|
|
401
|
+
* bill.
|
|
402
|
+
*
|
|
403
|
+
* If you need additional filters, you can use the entity filter to search
|
|
404
|
+
* for bills from a specific vendor or vendor sub (using the
|
|
405
|
+
* `ListIDWithChildren` or `FullNameWithChildren` tags). You can also search
|
|
406
|
+
* for bills entered against a particular account (the `APAccountRef`
|
|
407
|
+
* specified in the originating `BillAdd` request). You can specify all
|
|
408
|
+
* subaccounts by using the various *WithChildren tags. For example, to find
|
|
409
|
+
* all bills entered against Checking where you have multiple checking
|
|
410
|
+
* accounts, you would use the `ListIDWithChildren` or
|
|
411
|
+
* `FullNameWithChildren` tags inside your AccountFilter tags. Finally, you
|
|
412
|
+
* can filter on the `RefNumber` or `RefNumber` range. Notice that all of
|
|
413
|
+
* these filters can be used together (ANDed) if desired.
|
|
414
|
+
*
|
|
415
|
+
* To prevent the return of too much data, you can use `MaxReturned` to
|
|
416
|
+
* limit the total number of bills returned from the query. In addition, you
|
|
417
|
+
* can limit the type of data that is returned for each bill, using
|
|
418
|
+
* `IncludeRetElement`.
|
|
419
|
+
*
|
|
420
|
+
* Finally, you can specify whether each bill contains line items using the
|
|
421
|
+
* `IncludeLineItems`, which by default is `False` (no line item data).
|
|
422
|
+
*
|
|
423
|
+
* See more: https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/BillPaymentCreditCardQuery
|
|
424
|
+
*/
|
|
425
|
+
query: async (endUserId, params = {}) => this.sendRequestWrapper(endUserId, { BillPaymentCreditCardQueryRq: params }, "BillPaymentCreditCardQueryRs", "BillPaymentCreditCardRet"),
|
|
426
|
+
};
|
|
332
427
|
/**
|
|
333
428
|
* A build assembly represents an inventory item created from other inventory
|
|
334
429
|
* items or assemblies.
|
|
@@ -786,6 +786,106 @@ export interface BillPaymentCheckRet {
|
|
|
786
786
|
/** A list of `IDataExtRet` objects, each of which represents a field that has been added to QuickBooks as a data extension. */
|
|
787
787
|
DataExtRet?: DataExtRet | DataExtRet[];
|
|
788
788
|
}
|
|
789
|
+
export interface BillPaymentCreditCardAdd {
|
|
790
|
+
/** Refers to a payee who is a customer, vendor, employee, or person on the “other names” list. In a request, if a `PayeeEntityRef` aggregate includes both `FullName` and `ListID`, `FullName` will be ignored. In a Check message, `PayeeEntityRef` refers to the person or company to whom the check is written. In `CreditCardCharge` and `CreditCardCredit` messages, `PayeeEntityRef` refers to the vendor or company from whom merchandise was purchased. (`PayeeEntityRef` corresponds to the choice in the Purchased From list in QuickBooks.) */
|
|
791
|
+
PayeeEntityRef: PayeeEntityRef;
|
|
792
|
+
/** Refers to an accounts payable account in the QuickBooks file. (The `AccountType` of this account will be `AccountsPayable`.) If `APAccountRef` is missing, the SDK will use the QuickBooks default AP account. In a request, if an `APAccountRef` aggregate includes both `FullName` and `ListID`, `FullName` will be ignored. */
|
|
793
|
+
APAccountRef?: APAccountRef;
|
|
794
|
+
/** The date of the transaction. In some cases, if you leave `TxnDate` out of an -Add message, QuickBooks will prefill `TxnDate` with the date of the last-saved transaction of the same type. */
|
|
795
|
+
TxnDate?: string;
|
|
796
|
+
/** Refers to the credit card account to which this payment is being charged. In a request, if a `CreditCardAccountRef` aggregate includes both `FullName` and `ListID`, `FullName` will be ignored. */
|
|
797
|
+
CreditCardAccountRef: CreditCardAccountRef;
|
|
798
|
+
/** A string of characters that refers to this transaction and that can be arbitrarily changed by the QuickBooks user. In a `BillPaymentCheckAdd` request, if you want to set the check number, use `RefNumber`.`Note` (especially relevant to `CheckAdd` requests): When `RefNumber` is left blank in an SDK transaction add request (that is, or ), the `RefNumber` will be left blank in QuickBooks. This behavior is new as of QBFC3. It used to select the next sequential reference number since the last one used by QuickBooks, as though no `RefNumber` had been provided. This is especially relevant to `CheckAdd` requests because with the current behavior, you will not know the number until the check is printed. */
|
|
799
|
+
RefNumber?: string;
|
|
800
|
+
/** Additional information. */
|
|
801
|
+
Memo?: string;
|
|
802
|
+
/** The exchange rate is the market price for which this currency can be exchanged for the currency used by the QuickBooks company file as the “home” currency. The exchange rate should be considered a snapshot of the rates in effect at the `AsOfDate`. You can update the exchange rate using the exchange rate property when you add a transaction. However, you need to obtain and supply the exchange rate. If you are using USD (United States Dollars) as the home currency and are connected to the Internet, you can download the current exchange rates for all active currencies automatically in the QuickBooks UI by selecting Lists->Currency->Activities->Download latest exchange rates. (Currently, you can’t do this in the SDK.) */
|
|
803
|
+
ExchangeRate?: number;
|
|
804
|
+
/** Allows for the attachment of a user defined GUID value. */
|
|
805
|
+
ExternalGUID?: string;
|
|
806
|
+
/** `AppliedToTxn` List A list of `AppliedToTxn` aggregates. */
|
|
807
|
+
AppliedToTxnAdd: AppliedToTxnAdd | AppliedToTxnAdd[];
|
|
808
|
+
}
|
|
809
|
+
export interface BillPaymentCreditCardAddRq {
|
|
810
|
+
BillPaymentCreditCardAdd: BillPaymentCreditCardAdd;
|
|
811
|
+
/** You use this if you want to limit the data that will be returned in the response. In this list, you specify the name of each top-level element or aggregate that you want to be returned in the response to the request. You cannot specify fields within an aggregate, for example, you cannot specify a `City` within an `Address`: you must specify `Address` and will get the entire address. The names specified in the list are not parsed, so you must be especially careful to supply valid names, properly cased. No error is returned in the status code if you specify an invalid name. Notice that if you want to return custom data or private data extensions, you must specify the `DataExtRet` element and you must supply the `OwnerID` set to either a value of 0 (custom data) or the GUID for the private data. */
|
|
812
|
+
IncludeRetElement?: string[] | string;
|
|
813
|
+
}
|
|
814
|
+
export interface BillPaymentCreditCardAddRs {
|
|
815
|
+
BillPaymentCreditCardRet?: BillPaymentCreditCardRet;
|
|
816
|
+
ErrorRecovery?: ErrorRecovery;
|
|
817
|
+
}
|
|
818
|
+
export interface BillPaymentCreditCardQueryRq {
|
|
819
|
+
/** One or more `TxnID` values. QuickBooks generates a unique `TxnID` for each transaction that is added to QuickBooks. Notice that you cannot supply the `TxnID` of a `TimeTracking` transaction to `TransactionQuery` requests. If you do, you get an error stating that no such record could be found, even though the transaction is in QuickBooks. This behavior reflects the behavior in the QuicKBooks UI in the Find window. */
|
|
820
|
+
TxnID?: string[] | string;
|
|
821
|
+
/** A list of one or more `RefNumber` values. A `RefNumber` is a string of characters that refers to a transaction and that can be arbitrarily changed by the QuickBooks user. Note (especially relevant to `CheckAdd` requests): When `RefNumber` is left blank in an SDK transaction add request, the `RefNumber` will be left blank in QuickBooks. This behavior is new as of QBFC3. It used to select the next sequential reference number since the last one used by QuickBooks, as though no `RefNumber` had been provided. This is especially relevant to `CheckAdd` requests because with the current behavior, you will not know the number until the check is printed. */
|
|
822
|
+
RefNumber?: string[] | string;
|
|
823
|
+
/** A list of one or more case sensitive `RefNumber` values. A `RefNumber` is a string of characters that refers to a transaction and that can be arbitrarily changed by the QuickBooks user. You should use this case sensitive ref number list rather than the older `RefNumber` list, because it provides much better performance in certain circumstances. The older `refNumber` list provided slow performance if the `refNumber` values contained letters, not just digits. This `RefNumberCaseSensitive` list, new in SDK 4.0, eliminates this performance hit. */
|
|
824
|
+
RefNumberCaseSensitive?: string[] | string;
|
|
825
|
+
/** Limits the number of objects that a query returns. (To get a count of how many objects could possibly be returned, use the `metaData` query attribute.) If you include a `MaxReturned` value, it must be at least 1. */
|
|
826
|
+
MaxReturned?: number;
|
|
827
|
+
/** Filters according to the dates when transactions were last modified. The `ModifiedDateRangeFilter` aggregate is not required to contain any elements, but if it is empty, we recommend that you leave it out altogether. Note that the time portion of the `FromModifiedDate` and `ToModifiedDate` fields was not supported in qbXML version 1.0 or 1.1. (To filter according to the dates when transactions were deleted, use a `TxnDeletedQuery` message.) */
|
|
828
|
+
ModifiedDateRangeFilter?: ModifiedDateRangeFilter;
|
|
829
|
+
/** Filters according to the original transaction dates. */
|
|
830
|
+
TxnDateRangeFilter?: TxnDateRangeFilter;
|
|
831
|
+
/** An entity refers to a person on the QuickBooks Customer list, Vendor list, Employee list, or `Other` Names list. You can use an `EntityQuery` request to get information about all the entities that are set up in the QuickBooks file. In an `ARRefundCreditCard` query, this must be a customer/customer job. */
|
|
832
|
+
EntityFilter?: EntityFilter;
|
|
833
|
+
/** Filters according to the account name or `ListID`. If the “Use account numbers” preference is enabled in the QuickBooks company file, you can specify an account number (instead of an account name) for `FullName` and get the account you’re looking for. But if numbers have been used as account names, confusion could arise. For example, if you queried for an account named 2050, and 2050 happened to be the account number of a totally different account, the query would not return what you asked for (the account named 2050), but instead would return the account with the account number 2050. This problem will not happen if the “Use account numbers” preference is turned off in the QuickBooks file, orthe account name exactly matches the account number. (In this case, query would return the correct account either way.) To avoid this problem: Do not name an account using a number unless the number exactly matches the account’s account number. If an account name must contain a number that does not match its own account number, have the QuickBooks user change the account’s name slightly, for example `to` 2050a. */
|
|
834
|
+
AccountFilter?: AccountFilter;
|
|
835
|
+
/** Filters according to `RefNumber`. */
|
|
836
|
+
RefNumberFilter?: RefNumberFilter;
|
|
837
|
+
/** Filters according to `RefNumber`. The filtering code will do a numerical comparison (if `FromRefNumber` and `ToRefNumber` only contain digits) or a lexicographical comparison (if either `FromRefNumber` or `ToRefNumber` contain any nondigit characters). In the first situation, if you need to query for a `RefNumber` that is larger than the maximum long integer value of 2147483647, one workaround is to specify a `FromRefNumber` that is less than or equal to 2147483647 without specifying a `ToRefNumber`. */
|
|
838
|
+
RefNumberRangeFilter?: RefNumberRangeFilter;
|
|
839
|
+
/** Filters by the specified currency. */
|
|
840
|
+
CurrencyFilter?: CurrencyFilter;
|
|
841
|
+
/** This filter allows you to omit line items from a query response to get a smaller result. The default value is false, so line items are omitted by default. Set `IncludeLineItems` to true to include line items in the response if you don’t mind getting a larger result. */
|
|
842
|
+
IncludeLineItems?: boolean;
|
|
843
|
+
/** You use this if you want to limit the data that will be returned in the response. In this list, you specify the name of each top-level element or aggregate that you want to be returned in the response to the request. You cannot specify fields within an aggregate, for example, you cannot specify a `City` within an `Address`: you must specify `Address` and will get the entire address. The names specified in the list are not parsed, so you must be especially careful to supply valid names, properly cased. No error is returned in the status code if you specify an invalid name. Notice that if you want to return custom data or private data extensions, you must specify the `DataExtRet` element and you must supply the `OwnerID` set to either a value of 0 (custom data) or the GUID for the private data. */
|
|
844
|
+
IncludeRetElement?: string[] | string;
|
|
845
|
+
/** Zero or more `OwnerID` values. `OwnerID` refers to the owner of a data extension:If `OwnerID` is 0, this is a public data extension, also known as a custom field. Custom fields appear in the QuickBooks UI.If `OwnerID` is a GUID, for example `{6B063959-81B0-4622-85D6-F548C8CCB517}`, this field is a private data extension defined by an integrated application. Private data extensions do not appear in the QuickBooks UI. Note that `OwnerID` values are not case-sensitive, meaning that if you enter an `OwnerID` value with lower-case letters, the value will be saved and returned with upper-case letters. When you share a private data extension with another application, the other application must know both the `OwnerID` and the `DataExtName`, as these together form a data extension’s unique name. */
|
|
846
|
+
OwnerID?: string[] | string;
|
|
847
|
+
}
|
|
848
|
+
export interface BillPaymentCreditCardQueryRs {
|
|
849
|
+
BillPaymentCreditCardRet: BillPaymentCreditCardRet[];
|
|
850
|
+
}
|
|
851
|
+
export interface BillPaymentCreditCardRet {
|
|
852
|
+
/** QuickBooks generates a unique `TxnID` for each transaction that is added to QuickBooks. A `TxnID` returned from a request can be used to refer to the transaction in subsequent requests. Notice that you cannot supply the `TxnID` of a `TimeTracking` transaction to `TransactionQueryRq` requests. If you do, you get an error stating that no such record could be found, even though the transaction is in QuickBooks. This behavior reflects the behavior in the QuicKBooks UI in the Find window. */
|
|
853
|
+
TxnID?: string;
|
|
854
|
+
/** Time the object was created. */
|
|
855
|
+
TimeCreated?: string;
|
|
856
|
+
/** Time the object was last modified. */
|
|
857
|
+
TimeModified?: string;
|
|
858
|
+
/** A number that the server generates and assigns to this object. Every time the object is changed, the server will change its `EditSequence` value. When you try to modify a list object, you must provide its `EditSequence`. The server compares the `EditSequence` you provide with the `EditSequence` in memory to make sure you are dealing with the latest copy of the object. If you are not, the server will reject the request and return an error. Because `EditSequence` is only used to check whether two objects match, there is no reason to interpret its value. */
|
|
859
|
+
EditSequence?: string;
|
|
860
|
+
/** An identifying number for this transaction. */
|
|
861
|
+
TxnNumber?: number;
|
|
862
|
+
/** Refers to a payee who is a customer, vendor, employee, or person on the “other names” list. In a request, if a `PayeeEntityRef` aggregate includes both `FullName` and `ListID`, `FullName` will be ignored. In a Check message, `PayeeEntityRef` refers to the person or company to whom the check is written. In `CreditCardCharge` and `CreditCardCredit` messages, `PayeeEntityRef` refers to the vendor or company from whom merchandise was purchased. (`PayeeEntityRef` corresponds to the choice in the Purchased From list in QuickBooks.) */
|
|
863
|
+
PayeeEntityRef?: PayeeEntityRef;
|
|
864
|
+
/** Refers to an accounts payable account in the QuickBooks file. (The `AccountType` of this account will be `AccountsPayable`.) If `APAccountRef` is missing, the SDK will use the QuickBooks default AP account. In a request, if an `APAccountRef` aggregate includes both `FullName` and `ListID`, `FullName` will be ignored. */
|
|
865
|
+
APAccountRef?: APAccountRef;
|
|
866
|
+
/** The date of the transaction. In some cases, if you leave `TxnDate` out of an -Add message, QuickBooks will prefill `TxnDate` with the date of the last-saved transaction of the same type. */
|
|
867
|
+
TxnDate?: string;
|
|
868
|
+
/** Refers to the credit card account to which this payment is being charged. In a request, if a `CreditCardAccountRef` aggregate includes both `FullName` and `ListID`, `FullName` will be ignored. */
|
|
869
|
+
CreditCardAccountRef?: CreditCardAccountRef;
|
|
870
|
+
/** A monetary amount. */
|
|
871
|
+
Amount?: string;
|
|
872
|
+
/** The currency object contains all of the information needed by QuickBooks to display and use. For built-in currencies, the name and currency code values are internationally accepted values and thus are not editable. The comma format is editable, as is the `IsActive` status. For user-defined currencies, every value in the object is editable including name and currency code. When used with `PriceLevels`, the `CurrencyRef` should only be used with “per item” price levels. */
|
|
873
|
+
CurrencyRef?: CurrencyRef;
|
|
874
|
+
/** The exchange rate is the market price for which this currency can be exchanged for the currency used by the QuickBooks company file as the “home” currency. The exchange rate should be considered a snapshot of the rates in effect at the `AsOfDate`. You can update the exchange rate using the exchange rate property when you add a transaction. However, you need to obtain and supply the exchange rate. If you are using USD (United States Dollars) as the home currency and are connected to the Internet, you can download the current exchange rates for all active currencies automatically in the QuickBooks UI by selecting Lists->Currency->Activities->Download latest exchange rates. (Currently, you can’t do this in the SDK.) */
|
|
875
|
+
ExchangeRate?: number;
|
|
876
|
+
/** Amount in units of the home currency. */
|
|
877
|
+
AmountInHomeCurrency?: string;
|
|
878
|
+
/** A string of characters that refers to this transaction and that can be arbitrarily changed by the QuickBooks user. In a `BillPaymentCheckAdd` request, if you want to set the check number, use `RefNumber`.`Note` (especially relevant to `CheckAdd` requests): When `RefNumber` is left blank in an SDK transaction add request (that is, or ), the `RefNumber` will be left blank in QuickBooks. This behavior is new as of QBFC3. It used to select the next sequential reference number since the last one used by QuickBooks, as though no `RefNumber` had been provided. This is especially relevant to `CheckAdd` requests because with the current behavior, you will not know the number until the check is printed. */
|
|
879
|
+
RefNumber?: string;
|
|
880
|
+
/** Additional information. */
|
|
881
|
+
Memo?: string;
|
|
882
|
+
/** Allows for the attachment of a user defined GUID value. */
|
|
883
|
+
ExternalGUID?: string;
|
|
884
|
+
/** `AppliedToTxn` List A list of `AppliedToTxn` aggregates. */
|
|
885
|
+
AppliedToTxnRet?: AppliedToTxnRet | AppliedToTxnRet[];
|
|
886
|
+
/** A list of `IDataExtRet` objects, each of which represents a field that has been added to QuickBooks as a data extension. */
|
|
887
|
+
DataExtRet?: DataExtRet | DataExtRet[];
|
|
888
|
+
}
|
|
789
889
|
export interface BillQueryRq {
|
|
790
890
|
/** One or more `TxnID` values. QuickBooks generates a unique `TxnID` for each transaction that is added to QuickBooks.
|
|
791
891
|
|
|
@@ -1780,6 +1880,12 @@ export interface ContactsRet {
|
|
|
1780
1880
|
/** List of additional contacts. */
|
|
1781
1881
|
AdditionalContactRef?: AdditionalContactRef | AdditionalContactRef[];
|
|
1782
1882
|
}
|
|
1883
|
+
export interface CreditCardAccountRef {
|
|
1884
|
+
/** Along with `FullName`, `ListID` is a way to identify a list object. When a list object is added to QuickBooks through the SDK or through the QuickBooks user interface, the server assigns it a `ListID`. A `ListID` is not unique across lists, but it is unique across each particular type of list. For example, two customers could not have the same `ListID`, and a customer could not have the same `ListID` as an employee (because Customer and Employee are both name lists). But a customer could have the same `ListID` as a non-inventory item. */
|
|
1885
|
+
ListID?: string;
|
|
1886
|
+
/** `FullName` (along with `ListID`) is a way to identify a list object. The `FullName` is the name prefixed by the names of each ancestor, for example `Jones:Kitchen:Cabinets`. `FullName` values are not case-sensitive. */
|
|
1887
|
+
FullName?: string;
|
|
1888
|
+
}
|
|
1783
1889
|
export interface CreditCardChargeAdd {
|
|
1784
1890
|
/** The Account list is the company file’s list of accounts. An `AccountRef` aggregate refers to one of these accounts. (If an `AccountRef` aggregate includes both `FullName` and `ListID`, `FullName` will be ignored.) Special cases to note:In a Check message, `AccountRef` refers to the account from which the funds are being drawn for this check, for example, Checking or Savings.In an `ExpenseLineAdd` message, you must include `AccountRef` if the “Require accounts” check box is selected in the QuickBooks Accounting preferences. (It is selected by default.) In a `CreditCardCredit` message, `AccountRef` refers to the bank account or credit card account to which the credit is applied.In a `CreditCardCharge` message, `AccountRef` refers to the bank or credit card company to whom money is owed. How do you increase and decrease amounts in bank accounts? The following requests increase the balance in a bank account: Deposit Add `ReceivePaymentAdd` Journal Entry Add Sales `ReceiptAdd` The following requests decrease the balance in a bank account: `CheckAdd` Bill `PaymentCheckAdd` `JournalEntryAdd` */
|
|
1785
1891
|
AccountRef: AccountRef;
|
|
@@ -2668,9 +2774,9 @@ export interface CreditMemoMod {
|
|
|
2668
2774
|
You can update the exchange rate using the exchange rate property when you add a transaction. However, you need to obtain and supply the exchange rate. If you are using USD (United States Dollars) as the home currency and are connected to the Internet, you can download the current exchange rates for all active currencies automatically in the QuickBooks UI by selecting Lists->Currency->Activities->Download latest exchange rates. (Currently, you can’t do this in the SDK.) */
|
|
2669
2775
|
ExchangeRate?: number;
|
|
2670
2776
|
/** Represents one line in the credit memo. Compare with `CreditMemoGroupLine`, which represents a previously defined group of lines in the credit memo. */
|
|
2671
|
-
CreditMemoLineMod?: CreditMemoLineMod;
|
|
2777
|
+
CreditMemoLineMod?: CreditMemoLineMod | CreditMemoLineMod[];
|
|
2672
2778
|
/** Represents a previously defined group of lines in the credit memo. Compare with `CreditMemoLine`, which represents just one line in the credit memo. */
|
|
2673
|
-
CreditMemoLineGroupMod?: CreditMemoLineGroupMod;
|
|
2779
|
+
CreditMemoLineGroupMod?: CreditMemoLineGroupMod | CreditMemoLineGroupMod[];
|
|
2674
2780
|
}
|
|
2675
2781
|
export interface CreditMemoModRq {
|
|
2676
2782
|
CreditMemoMod: CreditMemoMod;
|
|
@@ -2840,9 +2946,9 @@ export interface CreditMemoRet {
|
|
|
2840
2946
|
The list of linked transactions is similar to the History view of a transaction in the user interface, but not identical, as the SDK list contains only linked transactions, not items. */
|
|
2841
2947
|
LinkedTxn?: LinkedTxn | LinkedTxn[];
|
|
2842
2948
|
/** Represents one line in the credit memo. Compare with `CreditMemoGroupLine`, which represents a previously defined group of lines in the credit memo. */
|
|
2843
|
-
CreditMemoLineRet?: CreditMemoLineRet;
|
|
2949
|
+
CreditMemoLineRet?: CreditMemoLineRet | CreditMemoLineRet[];
|
|
2844
2950
|
/** Represents a previously defined group of lines in the credit memo. Compare with `CreditMemoLine`, which represents just one line in the credit memo. */
|
|
2845
|
-
CreditMemoLineGroupRet?: CreditMemoLineGroupRet;
|
|
2951
|
+
CreditMemoLineGroupRet?: CreditMemoLineGroupRet | CreditMemoLineGroupRet[];
|
|
2846
2952
|
/** A list of `IDataExtRet` objects, each of which represents a field that has been added to QuickBooks as a data extension. */
|
|
2847
2953
|
DataExtRet?: DataExtRet | DataExtRet[];
|
|
2848
2954
|
}
|
|
@@ -4654,9 +4760,9 @@ export interface EstimateMod {
|
|
|
4654
4760
|
/** One line of this estimate. Compare with `EstimateLineGroup`, which represents a previously defined group of lines in the estimate.
|
|
4655
4761
|
|
|
4656
4762
|
In a Mod request, you can add a new line by supplying a `TxnLineID` value of -1. */
|
|
4657
|
-
EstimateLineMod?: EstimateLineMod;
|
|
4763
|
+
EstimateLineMod?: EstimateLineMod | EstimateLineMod[];
|
|
4658
4764
|
/** Represents a previously defined group of lines in the estimate. Compare with `EstimateLine`, which represents just one line in the estimate. */
|
|
4659
|
-
EstimateLineGroupMod?: EstimateLineGroupMod;
|
|
4765
|
+
EstimateLineGroupMod?: EstimateLineGroupMod | EstimateLineGroupMod[];
|
|
4660
4766
|
}
|
|
4661
4767
|
export interface EstimateModRq {
|
|
4662
4768
|
EstimateMod: EstimateMod;
|
|
@@ -4826,9 +4932,9 @@ export interface EstimateRet {
|
|
|
4826
4932
|
/** One line of this estimate. Compare with `EstimateLineGroup`, which represents a previously defined group of lines in the estimate.
|
|
4827
4933
|
|
|
4828
4934
|
In a Mod request, you can add a new line by supplying a `TxnLineID` value of -1. */
|
|
4829
|
-
EstimateLineRet?: EstimateLineRet;
|
|
4935
|
+
EstimateLineRet?: EstimateLineRet | EstimateLineRet[];
|
|
4830
4936
|
/** Represents a previously defined group of lines in the estimate. Compare with `EstimateLine`, which represents just one line in the estimate. */
|
|
4831
|
-
EstimateLineGroupRet?: EstimateLineGroupRet;
|
|
4937
|
+
EstimateLineGroupRet?: EstimateLineGroupRet | EstimateLineGroupRet[];
|
|
4832
4938
|
/** A list of `IDataExtRet` objects, each of which represents a field that has been added to QuickBooks as a data extension. */
|
|
4833
4939
|
DataExtRet?: DataExtRet | DataExtRet[];
|
|
4834
4940
|
}
|
|
@@ -5864,9 +5970,9 @@ export interface InvoiceMod {
|
|
|
5864
5970
|
If you need to retrieve which transactions were linked in the `SetCredit`, for Bill Payment, you must do a `BillQuery` and specify `IncludeLinkedTxns`. */
|
|
5865
5971
|
SetCredit?: SetCredit | SetCredit[];
|
|
5866
5972
|
/** Represents one line in the invoice. Compare with `InvoiceLineGroup`, which represents a previously defined group of lines in the invoice. */
|
|
5867
|
-
InvoiceLineMod?: InvoiceLineMod;
|
|
5973
|
+
InvoiceLineMod?: InvoiceLineMod | InvoiceLineMod[];
|
|
5868
5974
|
/** Represents a previously defined group of lines in the invoice. Compare with `InvoiceLine`, which represents just one line in the invoice. */
|
|
5869
|
-
InvoiceLineGroupMod?: InvoiceLineGroupMod;
|
|
5975
|
+
InvoiceLineGroupMod?: InvoiceLineGroupMod | InvoiceLineGroupMod[];
|
|
5870
5976
|
}
|
|
5871
5977
|
export interface InvoiceModRq {
|
|
5872
5978
|
InvoiceMod: InvoiceMod;
|
|
@@ -9636,9 +9742,9 @@ export interface PurchaseOrderMod {
|
|
|
9636
9742
|
/** The exchange rate is the market price for which this currency can be exchanged for the currency used by the QuickBooks company file as the “home” currency. The exchange rate should be considered a snapshot of the rates in effect at the `AsOfDate`. You can update the exchange rate using the exchange rate property when you add a transaction. However, you need to obtain and supply the exchange rate. If you are using USD (United States Dollars) as the home currency and are connected to the Internet, you can download the current exchange rates for all active currencies automatically in the QuickBooks UI by selecting Lists->Currency->Activities->Download latest exchange rates. (Currently, you can’t do this in the SDK.) */
|
|
9637
9743
|
ExchangeRate?: number;
|
|
9638
9744
|
/** One line of the purchase order. Compare with `PurchaseOrderLineGroup`, which represents a previously defined group of lines in the purchase order. */
|
|
9639
|
-
PurchaseOrderLineMod?: PurchaseOrderLineMod;
|
|
9745
|
+
PurchaseOrderLineMod?: PurchaseOrderLineMod | PurchaseOrderLineMod[];
|
|
9640
9746
|
/** Represents a previously defined group of lines in the purchase order. Compare with `PurchaseOrderLine`, which represents just one line in the purchase order. */
|
|
9641
|
-
PurchaseOrderLineGroupMod?: PurchaseOrderLineGroupMod;
|
|
9747
|
+
PurchaseOrderLineGroupMod?: PurchaseOrderLineGroupMod | PurchaseOrderLineGroupMod[];
|
|
9642
9748
|
}
|
|
9643
9749
|
export interface PurchaseOrderModRq {
|
|
9644
9750
|
PurchaseOrderMod: PurchaseOrderMod;
|
|
@@ -9760,9 +9866,9 @@ export interface PurchaseOrderRet {
|
|
|
9760
9866
|
/** If the `IncludeLinkedTxns` flag is set to true in a query, or if you create an item receipt that links to other transactionsthen the returned object will include a list of linked transactions, if any exist. If no linked transactions exist, the `ILinkedTxnList` object will be empty. The list of linked transactions is similar to the History view of a transaction in the user interface, but not identical, as the SDK list contains only linked transactions, not items. */
|
|
9761
9867
|
LinkedTxn?: LinkedTxn | LinkedTxn[];
|
|
9762
9868
|
/** One line of the purchase order. Compare with `PurchaseOrderLineGroup`, which represents a previously defined group of lines in the purchase order. */
|
|
9763
|
-
PurchaseOrderLineRet?: PurchaseOrderLineRet;
|
|
9869
|
+
PurchaseOrderLineRet?: PurchaseOrderLineRet | PurchaseOrderLineRet[];
|
|
9764
9870
|
/** Represents a previously defined group of lines in the purchase order. Compare with `PurchaseOrderLine`, which represents just one line in the purchase order. */
|
|
9765
|
-
PurchaseOrderLineGroupRet?: PurchaseOrderLineGroupRet;
|
|
9871
|
+
PurchaseOrderLineGroupRet?: PurchaseOrderLineGroupRet | PurchaseOrderLineGroupRet[];
|
|
9766
9872
|
/** A list of `IDataExtRet` objects, each of which represents a field that has been added to QuickBooks as a data extension. */
|
|
9767
9873
|
DataExtRet?: DataExtRet | DataExtRet[];
|
|
9768
9874
|
}
|
|
@@ -10460,9 +10566,9 @@ export interface SalesOrderMod {
|
|
|
10460
10566
|
/** The exchange rate is the market price for which this currency can be exchanged for the currency used by the QuickBooks company file as the “home” currency. The exchange rate should be considered a snapshot of the rates in effect at the `AsOfDate`. You can update the exchange rate using the exchange rate property when you add a transaction. However, you need to obtain and supply the exchange rate. If you are using USD (United States Dollars) as the home currency and are connected to the Internet, you can download the current exchange rates for all active currencies automatically in the QuickBooks UI by selecting Lists->Currency->Activities->Download latest exchange rates. (Currently, you can’t do this in the SDK.) */
|
|
10461
10567
|
ExchangeRate?: number;
|
|
10462
10568
|
/** Represents one line in the sales order. Compare with `SalesOrderLineGroup`, which represents a previously defined group of lines in the sales order. */
|
|
10463
|
-
SalesOrderLineMod?: SalesOrderLineMod;
|
|
10569
|
+
SalesOrderLineMod?: SalesOrderLineMod | SalesOrderLineMod[];
|
|
10464
10570
|
/** Represents a previously defined group of lines in the sales order. Compare with `SalesOrderLine`, which represents just one line in the sales order. */
|
|
10465
|
-
SalesOrderLineGroupMod?: SalesOrderLineGroupMod;
|
|
10571
|
+
SalesOrderLineGroupMod?: SalesOrderLineGroupMod | SalesOrderLineGroupMod[];
|
|
10466
10572
|
/** The Sales Channel `Name`. */
|
|
10467
10573
|
SOChannel?: SOChannel;
|
|
10468
10574
|
/** The Sales Store `Name`. */
|
|
@@ -10594,9 +10700,9 @@ export interface SalesOrderRet {
|
|
|
10594
10700
|
/** If the `IncludeLinkedTxns` flag is set to true in a query, or if you create an item receipt that links to other transactionsthen the returned object will include a list of linked transactions, if any exist. If no linked transactions exist, the `ILinkedTxnList` object will be empty. The list of linked transactions is similar to the History view of a transaction in the user interface, but not identical, as the SDK list contains only linked transactions, not items. */
|
|
10595
10701
|
LinkedTxn?: LinkedTxn | LinkedTxn[];
|
|
10596
10702
|
/** Represents one line in the sales order. Compare with `SalesOrderLineGroup`, which represents a previously defined group of lines in the sales order. */
|
|
10597
|
-
SalesOrderLineRet?: SalesOrderLineRet;
|
|
10703
|
+
SalesOrderLineRet?: SalesOrderLineRet | SalesOrderLineRet[];
|
|
10598
10704
|
/** Represents a previously defined group of lines in the sales order. Compare with `SalesOrderLine`, which represents just one line in the sales order. */
|
|
10599
|
-
SalesOrderLineGroupRet?: SalesOrderLineGroupRet;
|
|
10705
|
+
SalesOrderLineGroupRet?: SalesOrderLineGroupRet | SalesOrderLineGroupRet[];
|
|
10600
10706
|
/** A list of `IDataExtRet` objects, each of which represents a field that has been added to QuickBooks as a data extension. */
|
|
10601
10707
|
DataExtRet?: DataExtRet | DataExtRet[];
|
|
10602
10708
|
}
|
|
@@ -10929,9 +11035,9 @@ export interface SalesReceiptMod {
|
|
|
10929
11035
|
/** The exchange rate is the market price for which this currency can be exchanged for the currency used by the QuickBooks company file as the “home” currency. The exchange rate should be considered a snapshot of the rates in effect at the `AsOfDate`. You can update the exchange rate using the exchange rate property when you add a transaction. However, you need to obtain and supply the exchange rate. If you are using USD (United States Dollars) as the home currency and are connected to the Internet, you can download the current exchange rates for all active currencies automatically in the QuickBooks UI by selecting Lists->Currency->Activities->Download latest exchange rates. (Currently, you can’t do this in the SDK.) */
|
|
10930
11036
|
ExchangeRate?: number;
|
|
10931
11037
|
/** One line of the sales receipt. Compare with `SalesReceiptLineGroup`, which represents a previously defined group of lines in the sales receipt. */
|
|
10932
|
-
SalesReceiptLineMod?: SalesReceiptLineMod;
|
|
11038
|
+
SalesReceiptLineMod?: SalesReceiptLineMod | SalesReceiptLineMod[];
|
|
10933
11039
|
/** Represents a previously defined group of lines in the sales receipt. Compare with `SalesReceiptLine`, which represents just one line in the sales receipt. */
|
|
10934
|
-
SalesReceiptLineGroupMod?: SalesReceiptLineGroupMod;
|
|
11040
|
+
SalesReceiptLineGroupMod?: SalesReceiptLineGroupMod | SalesReceiptLineGroupMod[];
|
|
10935
11041
|
}
|
|
10936
11042
|
export interface SalesReceiptModRq {
|
|
10937
11043
|
SalesReceiptMod: SalesReceiptMod;
|
|
@@ -11057,9 +11163,9 @@ export interface SalesReceiptRet {
|
|
|
11057
11163
|
/** Allows for the attachment of a user defined GUID value. */
|
|
11058
11164
|
ExternalGUID?: string;
|
|
11059
11165
|
/** One line of the sales receipt. Compare with `SalesReceiptLineGroup`, which represents a previously defined group of lines in the sales receipt. */
|
|
11060
|
-
SalesReceiptLineRet?: SalesReceiptLineRet;
|
|
11166
|
+
SalesReceiptLineRet?: SalesReceiptLineRet | SalesReceiptLineRet[];
|
|
11061
11167
|
/** Represents a previously defined group of lines in the sales receipt. Compare with `SalesReceiptLine`, which represents just one line in the sales receipt. */
|
|
11062
|
-
SalesReceiptLineGroupRet?: SalesReceiptLineGroupRet;
|
|
11168
|
+
SalesReceiptLineGroupRet?: SalesReceiptLineGroupRet | SalesReceiptLineGroupRet[];
|
|
11063
11169
|
/** A list of `IDataExtRet` objects, each of which represents a field that has been added to QuickBooks as a data extension. */
|
|
11064
11170
|
DataExtRet?: DataExtRet | DataExtRet[];
|
|
11065
11171
|
}
|
|
@@ -3,9 +3,16 @@ export interface RequestConfigWithStartTime extends AxiosRequestConfig {
|
|
|
3
3
|
startTime: number;
|
|
4
4
|
}
|
|
5
5
|
export declare function addLoggingInterceptors(httpClient: AxiosInstance, verbose: boolean): void;
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
interface RequestLogObject {
|
|
7
|
+
method?: string;
|
|
8
|
+
url?: string;
|
|
9
|
+
headers?: {
|
|
10
|
+
"Content-Type"?: string;
|
|
11
|
+
Authorization?: string;
|
|
12
|
+
};
|
|
8
13
|
body?: Record<string, unknown>;
|
|
9
|
-
}
|
|
14
|
+
}
|
|
15
|
+
export declare function createRequestLogObject(config: AxiosRequestConfig): RequestLogObject;
|
|
10
16
|
export declare function getDurationStringFromConfig(config: RequestConfigWithStartTime): string;
|
|
11
17
|
export declare function stringifyForLogs(object: unknown): string;
|
|
18
|
+
export {};
|
|
@@ -33,22 +33,25 @@ function addLoggingInterceptors(httpClient, verbose) {
|
|
|
33
33
|
}
|
|
34
34
|
exports.addLoggingInterceptors = addLoggingInterceptors;
|
|
35
35
|
function createRequestLogObject(config) {
|
|
36
|
-
let endpoint = config.method?.toUpperCase();
|
|
37
|
-
if (config.url !== undefined) {
|
|
38
|
-
if (endpoint === undefined) {
|
|
39
|
-
endpoint = config.url;
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
endpoint += ` ${config.url}`;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
36
|
const requestInfo = {};
|
|
46
|
-
if (
|
|
47
|
-
requestInfo.
|
|
37
|
+
if (config.method !== undefined) {
|
|
38
|
+
requestInfo.method = config.method.toUpperCase();
|
|
39
|
+
}
|
|
40
|
+
if (config.baseURL !== undefined || config.url !== undefined) {
|
|
41
|
+
requestInfo.url = (config.baseURL ?? "") + (config.url ?? "");
|
|
48
42
|
}
|
|
49
43
|
if (config.data !== undefined) {
|
|
50
44
|
requestInfo.body = config.data;
|
|
51
45
|
}
|
|
46
|
+
if (config.headers !== undefined) {
|
|
47
|
+
requestInfo.headers = {};
|
|
48
|
+
if (config.headers["Content-Type"] !== undefined) {
|
|
49
|
+
requestInfo.headers["Content-Type"] = config.headers["Content-Type"];
|
|
50
|
+
}
|
|
51
|
+
if (config.headers.Authorization !== undefined) {
|
|
52
|
+
requestInfo.headers.Authorization = "BEARER sk_live_************";
|
|
53
|
+
}
|
|
54
|
+
}
|
|
52
55
|
return requestInfo;
|
|
53
56
|
}
|
|
54
57
|
exports.createRequestLogObject = createRequestLogObject;
|