Skip to content

Commit 133c5b5

Browse files
committed
update to minorversion 75
1 parent a8ede75 commit 133c5b5

File tree

4 files changed

+18
-16
lines changed

4 files changed

+18
-16
lines changed

components/quickbooks/actions/delete-purchase/delete-purchase.mjs

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "quickbooks-delete-purchase",
55
name: "Delete Purchase",
66
description: "Delete a specific purchase. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchase#delete-a-purchase)",
7-
version: "0.0.5",
7+
version: "0.0.6",
88
type: "action",
99
props: {
1010
quickbooks,
@@ -16,29 +16,26 @@ export default {
1616
},
1717
},
1818
async run({ $ }) {
19-
const {
20-
quickbooks,
21-
purchaseId,
22-
} = this;
19+
const purchaseId = this.purchaseId.value || this.purchaseId;
2320

24-
const [
25-
Id,
26-
SyncToken,
27-
] = purchaseId.value.split("|");
21+
const { Purchase: { SyncToken: syncToken } } = await this.quickbooks.getPurchase({
22+
$,
23+
purchaseId,
24+
});
2825

29-
const response = await quickbooks.deletePurchase({
26+
const response = await this.quickbooks.deletePurchase({
3027
$,
3128
data: {
32-
Id,
33-
SyncToken,
29+
Id: purchaseId,
30+
SyncToken: syncToken,
3431
},
3532
params: {
3633
operation: "delete",
3734
},
3835
});
3936

4037
if (response) {
41-
$.export("summary", `Successfully deleted purchase with ID ${Id}`);
38+
$.export("summary", `Successfully deleted purchase with ID ${purchaseId}`);
4239
}
4340

4441
return response;

components/quickbooks/actions/sparse-update-invoice/sparse-update-invoice.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
key: "quickbooks-sparse-update-invoice",
77
name: "Sparse Update Invoice",
88
description: "Sparse updating provides the ability to update a subset of properties for a given object; only elements specified in the request are updated. Missing elements are left untouched. The ID of the object to update is specified in the request body.​ [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#sparse-update-an-invoice)",
9-
version: "0.1.5",
9+
version: "0.1.6",
1010
type: "action",
1111
props: {
1212
quickbooks,
@@ -112,7 +112,7 @@ export default {
112112
invoiceId: this.invoiceId,
113113
});
114114

115-
if (lines?.length) invoice.Line?.push(lines);
115+
if (lines?.length) invoice.Line?.push(...lines);
116116

117117
const response = await this.quickbooks.sparseUpdateInvoice({
118118
$,

components/quickbooks/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/quickbooks",
3-
"version": "0.5.0",
3+
"version": "0.5.1",
44
"description": "Pipedream Quickbooks Components",
55
"main": "quickbooks.app.mjs",
66
"keywords": [

components/quickbooks/quickbooks.app.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,7 @@ export default {
451451
async _makeRequest({
452452
$ = this,
453453
path,
454+
params,
454455
...opts
455456
}) {
456457
const requestFn = async () => {
@@ -460,6 +461,10 @@ export default {
460461
Authorization: `Bearer ${this._accessToken()}`,
461462
accept: "application/json",
462463
},
464+
params: {
465+
...params,
466+
minorversion: 75,
467+
},
463468
...opts,
464469
});
465470
};

0 commit comments

Comments
 (0)