conductor-node 8.0.2 → 8.1.0
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 +2 -2
- package/dist/package.json +1 -1
- package/dist/src/graphql/graphqlOperationWrapper.js +2 -2
- package/dist/src/integrations/qbd/QbdIntegration.d.ts +159 -0
- package/dist/src/integrations/qbd/QbdIntegration.js +159 -0
- package/dist/src/integrations/qbd/qbdTypes.d.ts +1161 -133
- package/dist/src/utils/environment.js +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Conductor -
|
|
1
|
+
# Conductor - The best QuickBooks Desktop integration on the planet
|
|
2
2
|
|
|
3
3
|
Execute _any_ read or write [QuickBooks Desktop API](https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop) through async TypeScript and receive a fully-typed response.
|
|
4
4
|
|
|
@@ -59,7 +59,7 @@ The response looks like the following:
|
|
|
59
59
|
{
|
|
60
60
|
// ❗ Save this `id` to your database for executing requests to this
|
|
61
61
|
// end-user's integration in the future.
|
|
62
|
-
id: '
|
|
62
|
+
id: 'int_conn_1234abcd',
|
|
63
63
|
integrationKey: 'quickbooks-desktop',
|
|
64
64
|
endUserSourceId: "1234-abcd",
|
|
65
65
|
endUserEmail: 'danny@constructionco.com',
|
package/dist/package.json
CHANGED
|
@@ -26,7 +26,7 @@ async function graphqlOperationWrapper(operationName, variables, operation, verb
|
|
|
26
26
|
: {},
|
|
27
27
|
};
|
|
28
28
|
if (verbose) {
|
|
29
|
-
console.log(`Conductor request
|
|
29
|
+
console.log(`Conductor request start: ${node_util_1.default.inspect(graphqlInfo, {
|
|
30
30
|
depth: undefined,
|
|
31
31
|
})}`);
|
|
32
32
|
}
|
|
@@ -39,7 +39,7 @@ async function graphqlOperationWrapper(operationName, variables, operation, verb
|
|
|
39
39
|
...graphqlInfo,
|
|
40
40
|
};
|
|
41
41
|
const responseString = node_util_1.default.inspect(responseInfo, { depth: undefined });
|
|
42
|
-
console.log(`Conductor
|
|
42
|
+
console.log(`Conductor request complete: ${responseString}`);
|
|
43
43
|
}
|
|
44
44
|
return result;
|
|
45
45
|
}
|
|
@@ -454,6 +454,165 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
454
454
|
*/
|
|
455
455
|
query: (integrationConnectionId: string, params: QbdTypes.EmployeeQueryRq) => Promise<NonNullable<QbdTypes.EmployeeQueryRs["EmployeeRet"]>>;
|
|
456
456
|
};
|
|
457
|
+
invoice: {
|
|
458
|
+
/**
|
|
459
|
+
* Adds an invoice.
|
|
460
|
+
*
|
|
461
|
+
* An invoice records the amount owed by a customer who purchased goods or
|
|
462
|
+
* services but did not pay in full at the time of the sale. If full payment
|
|
463
|
+
* is received at the time of the sale, it is recorded as a sales receipt,
|
|
464
|
+
* not an invoice.
|
|
465
|
+
*
|
|
466
|
+
* In QuickBooks, invoices and estimates use similar fields, and an estimate
|
|
467
|
+
* can be converted into an invoice after the customer accepts the estimate.
|
|
468
|
+
* However, in the SDK, there is currently no ability to create an invoice
|
|
469
|
+
* directly from an estimate (you cannot link an invoice to an estimate).
|
|
470
|
+
*
|
|
471
|
+
* If you Add an invoice that has an inventory item on it, QB will
|
|
472
|
+
* automatically calculate COGS and post it to the COGS account. (The
|
|
473
|
+
* inventory item will need to be setup to post to the COGS account and must
|
|
474
|
+
* have a unit cost in it.) However, notice that such an InvoiceAdd has
|
|
475
|
+
* sales prices, not cost, so the Add is not impacting the cost of the item.
|
|
476
|
+
* The cost of the item is only affected by purchases (bills and item
|
|
477
|
+
* receipts) sales and inventory adjustments.
|
|
478
|
+
*
|
|
479
|
+
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/InvoiceAdd
|
|
480
|
+
*/
|
|
481
|
+
add: (integrationConnectionId: string, params: QbdTypes.InvoiceAddRq["InvoiceAdd"]) => Promise<NonNullable<QbdTypes.InvoiceAddRs["InvoiceRet"]>>;
|
|
482
|
+
/**
|
|
483
|
+
* Modifies an existing invoice. If you are modifying existing line items,
|
|
484
|
+
* supply an `InvoiceLineMod` and `TxnLineID` for each line you want to
|
|
485
|
+
* modify. If you want to add a new line, supply an `InvoiceLineMod` with
|
|
486
|
+
* its `TxnLineID` value set to -1.
|
|
487
|
+
*
|
|
488
|
+
* Some fields in an `InvoiceMod` request cannot be cleared. If any of the
|
|
489
|
+
* following fields is included in an invoice modify request, it must
|
|
490
|
+
* contain a value:
|
|
491
|
+
* - `CustomerRef`
|
|
492
|
+
* - `ARAccountRef`
|
|
493
|
+
* - `TemplateRef`
|
|
494
|
+
* - `TxnDate`
|
|
495
|
+
* - `IsPending`
|
|
496
|
+
* - `DueDate`
|
|
497
|
+
* - `ItemSalesTaxRef`
|
|
498
|
+
* - `ShipDate`
|
|
499
|
+
* - `IsToBePrinted`
|
|
500
|
+
*
|
|
501
|
+
* Within `InvoiceLineMod` or `InvoiceLineGroupMod`:
|
|
502
|
+
* - `ItemRef`
|
|
503
|
+
* - `Quantity`
|
|
504
|
+
* - `Rate`
|
|
505
|
+
* - `Amount`
|
|
506
|
+
* - `SalesTaxCodeRef`
|
|
507
|
+
* - `OverrideItemAccountRef`
|
|
508
|
+
*
|
|
509
|
+
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/InvoiceMod
|
|
510
|
+
*/
|
|
511
|
+
mod: (integrationConnectionId: string, params: QbdTypes.InvoiceModRq["InvoiceMod"]) => Promise<NonNullable<QbdTypes.InvoiceModRs["InvoiceRet"]>>;
|
|
512
|
+
/**
|
|
513
|
+
* Returns invoice data.
|
|
514
|
+
*
|
|
515
|
+
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/InvoiceQuery
|
|
516
|
+
*/
|
|
517
|
+
query: (integrationConnectionId: string, params: QbdTypes.InvoiceQueryRq) => Promise<NonNullable<QbdTypes.InvoiceQueryRs["InvoiceRet"]>>;
|
|
518
|
+
};
|
|
519
|
+
itemInventory: {
|
|
520
|
+
/**
|
|
521
|
+
* Adds an inventory item. An inventory item is any merchandise or part that
|
|
522
|
+
* a business purchases, tracks as inventory, and then resells. In
|
|
523
|
+
* QuickBooks, information about an inventory item is grouped into three
|
|
524
|
+
* categories:
|
|
525
|
+
* 1. Purchase Information includes `PurchaseDesc`, `PurchaseCost`,
|
|
526
|
+
* `COGSAccountRef`, and `PrefVendorRef`.
|
|
527
|
+
* 2. Sales Information includes `SalesDesc`, `SalesPrice`, and
|
|
528
|
+
* `SalesTaxCodeRef`.
|
|
529
|
+
* 3. Inventory Information includes `AssetAccountRef`, `ReorderPoint`,
|
|
530
|
+
* `QuantityOnHand`, `TotalValue`, and `InventoryDate`.
|
|
531
|
+
*
|
|
532
|
+
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/ItemInventoryAdd
|
|
533
|
+
*/
|
|
534
|
+
add: (integrationConnectionId: string, params: QbdTypes.ItemInventoryAddRq["ItemInventoryAdd"]) => Promise<NonNullable<QbdTypes.ItemInventoryAddRs["ItemInventoryRet"]>>;
|
|
535
|
+
/**
|
|
536
|
+
* Modifies an inventory item.
|
|
537
|
+
*
|
|
538
|
+
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/ItemInventoryMod
|
|
539
|
+
*/
|
|
540
|
+
mod: (integrationConnectionId: string, params: QbdTypes.ItemInventoryModRq["ItemInventoryMod"]) => Promise<NonNullable<QbdTypes.ItemInventoryModRs["ItemInventoryRet"]>>;
|
|
541
|
+
/**
|
|
542
|
+
* Queries for the specified inventory item or set of items.
|
|
543
|
+
*
|
|
544
|
+
* Notice that certain modifications to the item can be caused by other
|
|
545
|
+
* transactions, such as `ItemReceipts` where the item’s on hand quantity is
|
|
546
|
+
* increased. Modifications through these transactions do not result in
|
|
547
|
+
* changing the `TimeModified` stamp (only the `Mod` operation will do
|
|
548
|
+
* that), but those changes will be detected when you use the
|
|
549
|
+
* `FromModifiedDate`/`ToModifiedDate` filters in your query. Notice that
|
|
550
|
+
* you cannot get an inventory asset value from QuickBooks using this query.
|
|
551
|
+
* Instead, you need to use the General Summary Report query (which
|
|
552
|
+
* currently doesn’t include Assembly Items). Suppose you needed a way to
|
|
553
|
+
* search for the amount on hand of items that have had their amount changed
|
|
554
|
+
* since a certain date. Again, you would not use this query, but a
|
|
555
|
+
* `GeneralDetailReportQuery` that has its `GeneralDetailReportType` set to
|
|
556
|
+
* “InventoryValuationDetail”. This will tell you which items changed by how
|
|
557
|
+
* much. Also, suppose you wanted the on-hand quantity from QB as of a
|
|
558
|
+
* specific date. You would use a General Summary Report of the type
|
|
559
|
+
* Inventory Valuation Summary. (Again, this report doesn’t include
|
|
560
|
+
* Inventory Assemblies.)
|
|
561
|
+
*
|
|
562
|
+
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/ItemInventoryQuery
|
|
563
|
+
*/
|
|
564
|
+
query: (integrationConnectionId: string, params: QbdTypes.ItemInventoryQueryRq) => Promise<NonNullable<QbdTypes.ItemInventoryQueryRs["ItemInventoryRet"]>>;
|
|
565
|
+
};
|
|
566
|
+
itemNonInventory: {
|
|
567
|
+
/**
|
|
568
|
+
* Adds a non-inventory item, which is any material or part that a business
|
|
569
|
+
* buys but does not keep on hand as inventory. There are two types of
|
|
570
|
+
* non-inventory items:
|
|
571
|
+
* 1. Materials or parts that are part of the business’s overhead (for
|
|
572
|
+
* example, office supplies
|
|
573
|
+
* 2. Materials or parts that the business buys to finish a specific job and
|
|
574
|
+
* then charges back to the customer.
|
|
575
|
+
*
|
|
576
|
+
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/ItemNonInventoryAdd
|
|
577
|
+
*/
|
|
578
|
+
add: (integrationConnectionId: string, params: QbdTypes.ItemNonInventoryAddRq["ItemNonInventoryAdd"]) => Promise<NonNullable<QbdTypes.ItemNonInventoryAddRs["ItemNonInventoryRet"]>>;
|
|
579
|
+
/**
|
|
580
|
+
* Modifies a non inventory item.
|
|
581
|
+
*
|
|
582
|
+
* About `SalesOrPurchaseMod` versus `SalesAndPurchaseMod` in an
|
|
583
|
+
* `ItemNonInventoryMod` request: You cannot change the reimbursable status
|
|
584
|
+
* of a non-inventory item through the SDK. For example, if a non-inventory
|
|
585
|
+
* item is marked as non-reimbursable in QuickBooks, you cannot send a
|
|
586
|
+
* modify request that includes a `SalesAndPurchaseMod` aggregate.
|
|
587
|
+
* Similarly, if you send an `ItemNonInventoryAdd` request that includes a
|
|
588
|
+
* `SalesOrPurchase` aggregate, you cannot later modify that item using a
|
|
589
|
+
* `SalesAndPurchaseMod` aggregate.
|
|
590
|
+
*
|
|
591
|
+
* You can modify the various account references using the appropriate
|
|
592
|
+
* account reference aggregate and the matching Apply Account
|
|
593
|
+
* `RefToExistingTxns` boolean. You need to use the boolean when you change
|
|
594
|
+
* an account ref because the QuickBooks UI displays a prompt asking whether
|
|
595
|
+
* the change should apply to existing transactions or not. Specifying True
|
|
596
|
+
* for the boolean basically dismisses this with a “Yes” answer, allowing
|
|
597
|
+
* your changes to be made and changes any existing transactions that use
|
|
598
|
+
* the item with that `AccountRef`. Specifying “False” means that the mod will
|
|
599
|
+
* not take affect if there are existing transactions. Setting this to
|
|
600
|
+
* “True” should be used with caution and normally only after some user has
|
|
601
|
+
* indicated that they want those changes made to all those existing
|
|
602
|
+
* transactions! If any affected transactions are protected by a closing
|
|
603
|
+
* date and password, the `AccountRef` changes will not be made and so the Mod
|
|
604
|
+
* request will return an error without making the requested Mod.
|
|
605
|
+
*
|
|
606
|
+
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/ItemNonInventoryMod
|
|
607
|
+
*/
|
|
608
|
+
mod: (integrationConnectionId: string, params: QbdTypes.ItemNonInventoryModRq["ItemNonInventoryMod"]) => Promise<NonNullable<QbdTypes.ItemNonInventoryModRs["ItemNonInventoryRet"]>>;
|
|
609
|
+
/**
|
|
610
|
+
* Queries for the specified non-inventory item or set of items.
|
|
611
|
+
*
|
|
612
|
+
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/ItemNonInventoryQuery
|
|
613
|
+
*/
|
|
614
|
+
query: (integrationConnectionId: string, params: QbdTypes.ItemNonInventoryQueryRq) => Promise<NonNullable<QbdTypes.ItemNonInventoryQueryRs["ItemNonInventoryRet"]>>;
|
|
615
|
+
};
|
|
457
616
|
itemService: {
|
|
458
617
|
/**
|
|
459
618
|
* Adds a service item, which is an item that refers to services that a
|
|
@@ -458,6 +458,165 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
458
458
|
*/
|
|
459
459
|
query: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { EmployeeQueryRq: params }, "EmployeeQueryRs", "EmployeeRet"),
|
|
460
460
|
};
|
|
461
|
+
invoice = {
|
|
462
|
+
/**
|
|
463
|
+
* Adds an invoice.
|
|
464
|
+
*
|
|
465
|
+
* An invoice records the amount owed by a customer who purchased goods or
|
|
466
|
+
* services but did not pay in full at the time of the sale. If full payment
|
|
467
|
+
* is received at the time of the sale, it is recorded as a sales receipt,
|
|
468
|
+
* not an invoice.
|
|
469
|
+
*
|
|
470
|
+
* In QuickBooks, invoices and estimates use similar fields, and an estimate
|
|
471
|
+
* can be converted into an invoice after the customer accepts the estimate.
|
|
472
|
+
* However, in the SDK, there is currently no ability to create an invoice
|
|
473
|
+
* directly from an estimate (you cannot link an invoice to an estimate).
|
|
474
|
+
*
|
|
475
|
+
* If you Add an invoice that has an inventory item on it, QB will
|
|
476
|
+
* automatically calculate COGS and post it to the COGS account. (The
|
|
477
|
+
* inventory item will need to be setup to post to the COGS account and must
|
|
478
|
+
* have a unit cost in it.) However, notice that such an InvoiceAdd has
|
|
479
|
+
* sales prices, not cost, so the Add is not impacting the cost of the item.
|
|
480
|
+
* The cost of the item is only affected by purchases (bills and item
|
|
481
|
+
* receipts) sales and inventory adjustments.
|
|
482
|
+
*
|
|
483
|
+
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/InvoiceAdd
|
|
484
|
+
*/
|
|
485
|
+
add: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { InvoiceAddRq: { InvoiceAdd: params } }, "InvoiceAddRs", "InvoiceRet"),
|
|
486
|
+
/**
|
|
487
|
+
* Modifies an existing invoice. If you are modifying existing line items,
|
|
488
|
+
* supply an `InvoiceLineMod` and `TxnLineID` for each line you want to
|
|
489
|
+
* modify. If you want to add a new line, supply an `InvoiceLineMod` with
|
|
490
|
+
* its `TxnLineID` value set to -1.
|
|
491
|
+
*
|
|
492
|
+
* Some fields in an `InvoiceMod` request cannot be cleared. If any of the
|
|
493
|
+
* following fields is included in an invoice modify request, it must
|
|
494
|
+
* contain a value:
|
|
495
|
+
* - `CustomerRef`
|
|
496
|
+
* - `ARAccountRef`
|
|
497
|
+
* - `TemplateRef`
|
|
498
|
+
* - `TxnDate`
|
|
499
|
+
* - `IsPending`
|
|
500
|
+
* - `DueDate`
|
|
501
|
+
* - `ItemSalesTaxRef`
|
|
502
|
+
* - `ShipDate`
|
|
503
|
+
* - `IsToBePrinted`
|
|
504
|
+
*
|
|
505
|
+
* Within `InvoiceLineMod` or `InvoiceLineGroupMod`:
|
|
506
|
+
* - `ItemRef`
|
|
507
|
+
* - `Quantity`
|
|
508
|
+
* - `Rate`
|
|
509
|
+
* - `Amount`
|
|
510
|
+
* - `SalesTaxCodeRef`
|
|
511
|
+
* - `OverrideItemAccountRef`
|
|
512
|
+
*
|
|
513
|
+
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/InvoiceMod
|
|
514
|
+
*/
|
|
515
|
+
mod: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { InvoiceModRq: { InvoiceMod: params } }, "InvoiceModRs", "InvoiceRet"),
|
|
516
|
+
/**
|
|
517
|
+
* Returns invoice data.
|
|
518
|
+
*
|
|
519
|
+
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/InvoiceQuery
|
|
520
|
+
*/
|
|
521
|
+
query: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { InvoiceQueryRq: params }, "InvoiceQueryRs", "InvoiceRet"),
|
|
522
|
+
};
|
|
523
|
+
itemInventory = {
|
|
524
|
+
/**
|
|
525
|
+
* Adds an inventory item. An inventory item is any merchandise or part that
|
|
526
|
+
* a business purchases, tracks as inventory, and then resells. In
|
|
527
|
+
* QuickBooks, information about an inventory item is grouped into three
|
|
528
|
+
* categories:
|
|
529
|
+
* 1. Purchase Information includes `PurchaseDesc`, `PurchaseCost`,
|
|
530
|
+
* `COGSAccountRef`, and `PrefVendorRef`.
|
|
531
|
+
* 2. Sales Information includes `SalesDesc`, `SalesPrice`, and
|
|
532
|
+
* `SalesTaxCodeRef`.
|
|
533
|
+
* 3. Inventory Information includes `AssetAccountRef`, `ReorderPoint`,
|
|
534
|
+
* `QuantityOnHand`, `TotalValue`, and `InventoryDate`.
|
|
535
|
+
*
|
|
536
|
+
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/ItemInventoryAdd
|
|
537
|
+
*/
|
|
538
|
+
add: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { ItemInventoryAddRq: { ItemInventoryAdd: params } }, "ItemInventoryAddRs", "ItemInventoryRet"),
|
|
539
|
+
/**
|
|
540
|
+
* Modifies an inventory item.
|
|
541
|
+
*
|
|
542
|
+
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/ItemInventoryMod
|
|
543
|
+
*/
|
|
544
|
+
mod: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { ItemInventoryModRq: { ItemInventoryMod: params } }, "ItemInventoryModRs", "ItemInventoryRet"),
|
|
545
|
+
/**
|
|
546
|
+
* Queries for the specified inventory item or set of items.
|
|
547
|
+
*
|
|
548
|
+
* Notice that certain modifications to the item can be caused by other
|
|
549
|
+
* transactions, such as `ItemReceipts` where the item’s on hand quantity is
|
|
550
|
+
* increased. Modifications through these transactions do not result in
|
|
551
|
+
* changing the `TimeModified` stamp (only the `Mod` operation will do
|
|
552
|
+
* that), but those changes will be detected when you use the
|
|
553
|
+
* `FromModifiedDate`/`ToModifiedDate` filters in your query. Notice that
|
|
554
|
+
* you cannot get an inventory asset value from QuickBooks using this query.
|
|
555
|
+
* Instead, you need to use the General Summary Report query (which
|
|
556
|
+
* currently doesn’t include Assembly Items). Suppose you needed a way to
|
|
557
|
+
* search for the amount on hand of items that have had their amount changed
|
|
558
|
+
* since a certain date. Again, you would not use this query, but a
|
|
559
|
+
* `GeneralDetailReportQuery` that has its `GeneralDetailReportType` set to
|
|
560
|
+
* “InventoryValuationDetail”. This will tell you which items changed by how
|
|
561
|
+
* much. Also, suppose you wanted the on-hand quantity from QB as of a
|
|
562
|
+
* specific date. You would use a General Summary Report of the type
|
|
563
|
+
* Inventory Valuation Summary. (Again, this report doesn’t include
|
|
564
|
+
* Inventory Assemblies.)
|
|
565
|
+
*
|
|
566
|
+
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/ItemInventoryQuery
|
|
567
|
+
*/
|
|
568
|
+
query: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { ItemInventoryQueryRq: params }, "ItemInventoryQueryRs", "ItemInventoryRet"),
|
|
569
|
+
};
|
|
570
|
+
itemNonInventory = {
|
|
571
|
+
/**
|
|
572
|
+
* Adds a non-inventory item, which is any material or part that a business
|
|
573
|
+
* buys but does not keep on hand as inventory. There are two types of
|
|
574
|
+
* non-inventory items:
|
|
575
|
+
* 1. Materials or parts that are part of the business’s overhead (for
|
|
576
|
+
* example, office supplies
|
|
577
|
+
* 2. Materials or parts that the business buys to finish a specific job and
|
|
578
|
+
* then charges back to the customer.
|
|
579
|
+
*
|
|
580
|
+
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/ItemNonInventoryAdd
|
|
581
|
+
*/
|
|
582
|
+
add: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { ItemNonInventoryAddRq: { ItemNonInventoryAdd: params } }, "ItemNonInventoryAddRs", "ItemNonInventoryRet"),
|
|
583
|
+
/**
|
|
584
|
+
* Modifies a non inventory item.
|
|
585
|
+
*
|
|
586
|
+
* About `SalesOrPurchaseMod` versus `SalesAndPurchaseMod` in an
|
|
587
|
+
* `ItemNonInventoryMod` request: You cannot change the reimbursable status
|
|
588
|
+
* of a non-inventory item through the SDK. For example, if a non-inventory
|
|
589
|
+
* item is marked as non-reimbursable in QuickBooks, you cannot send a
|
|
590
|
+
* modify request that includes a `SalesAndPurchaseMod` aggregate.
|
|
591
|
+
* Similarly, if you send an `ItemNonInventoryAdd` request that includes a
|
|
592
|
+
* `SalesOrPurchase` aggregate, you cannot later modify that item using a
|
|
593
|
+
* `SalesAndPurchaseMod` aggregate.
|
|
594
|
+
*
|
|
595
|
+
* You can modify the various account references using the appropriate
|
|
596
|
+
* account reference aggregate and the matching Apply Account
|
|
597
|
+
* `RefToExistingTxns` boolean. You need to use the boolean when you change
|
|
598
|
+
* an account ref because the QuickBooks UI displays a prompt asking whether
|
|
599
|
+
* the change should apply to existing transactions or not. Specifying True
|
|
600
|
+
* for the boolean basically dismisses this with a “Yes” answer, allowing
|
|
601
|
+
* your changes to be made and changes any existing transactions that use
|
|
602
|
+
* the item with that `AccountRef`. Specifying “False” means that the mod will
|
|
603
|
+
* not take affect if there are existing transactions. Setting this to
|
|
604
|
+
* “True” should be used with caution and normally only after some user has
|
|
605
|
+
* indicated that they want those changes made to all those existing
|
|
606
|
+
* transactions! If any affected transactions are protected by a closing
|
|
607
|
+
* date and password, the `AccountRef` changes will not be made and so the Mod
|
|
608
|
+
* request will return an error without making the requested Mod.
|
|
609
|
+
*
|
|
610
|
+
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/ItemNonInventoryMod
|
|
611
|
+
*/
|
|
612
|
+
mod: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { ItemNonInventoryModRq: { ItemNonInventoryMod: params } }, "ItemNonInventoryModRs", "ItemNonInventoryRet"),
|
|
613
|
+
/**
|
|
614
|
+
* Queries for the specified non-inventory item or set of items.
|
|
615
|
+
*
|
|
616
|
+
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/ItemNonInventoryQuery
|
|
617
|
+
*/
|
|
618
|
+
query: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { ItemNonInventoryQueryRq: params }, "ItemNonInventoryQueryRs", "ItemNonInventoryRet"),
|
|
619
|
+
};
|
|
461
620
|
itemService = {
|
|
462
621
|
/**
|
|
463
622
|
* Adds a service item, which is an item that refers to services that a
|