Skip to content

Commit 7e27af9

Browse files
add invoice link and due date to create invoice
1 parent bbacb11 commit 7e27af9

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

components/quickbooks/actions/create-invoice/create-invoice.mjs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
key: "quickbooks-create-invoice",
77
name: "Create Invoice",
88
description: "Creates an invoice. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#create-an-invoice)",
9-
version: "0.1.8",
9+
version: "0.2.0",
1010
type: "action",
1111
props: {
1212
quickbooks,
@@ -22,6 +22,18 @@ export default {
2222
"currency",
2323
],
2424
},
25+
dueDate: {
26+
type: "string",
27+
label: "Due Date",
28+
description: "Date when the payment of the transaction is due (YYYY-MM-DD)",
29+
optional: true,
30+
},
31+
includeInvoiceLink: {
32+
type: "boolean",
33+
label: "Include Invoice Link",
34+
description: "Return the sharable link for the invoice sent to external customers",
35+
optional: true,
36+
},
2537
lineItemsAsObjects: {
2638
propDefinition: [
2739
quickbooks,
@@ -107,8 +119,14 @@ export default {
107119

108120
const response = await this.quickbooks.createInvoice({
109121
$,
122+
params: {
123+
include: this.includeInvoiceLink
124+
? "invoiceLink"
125+
: undefined,
126+
},
110127
data: {
111128
Line: lines,
129+
DueDate: this.dueDate,
112130
CustomerRef: {
113131
value: this.customerRefValue,
114132
},

0 commit comments

Comments
 (0)