Skip to content

Commit 4b0016b

Browse files
committed
add async options
1 parent e1586a6 commit 4b0016b

File tree

21 files changed

+217
-145
lines changed

21 files changed

+217
-145
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ export default {
1010
props: {
1111
quickbooks,
1212
vendorRefValue: {
13-
label: "Vendor Ref Value",
13+
propDefinition: [
14+
quickbooks,
15+
"vendorIds",
16+
],
1417
type: "string",
18+
label: "Vendor Ref Value",
1519
description: "Reference to the vendor for this transaction. Query the Vendor name list resource to determine the appropriate Vendor object for this reference. Use `Vendor.Id` from that object for `VendorRef.value`.",
1620
},
1721
lineItems: {

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ export default {
1616
],
1717
},
1818
customerRefValue: {
19-
label: "Customer Reference Value",
20-
type: "string",
21-
description: "Reference to a customer or job. Query the Customer name list resource to determine the appropriate Customer object for this reference. Use `Customer.Id` from that object for `CustomerRef.value`.",
19+
propDefinition: [
20+
quickbooks,
21+
"customer",
22+
],
2223
},
2324
customerRefName: {
2425
propDefinition: [

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ export default {
1414
type: "string",
1515
},
1616
customerRefValue: {
17-
label: "Customer Reference Value",
18-
description: "Reference to a customer or job. Query the Customer name list resource to determine the appropriate Customer object for this reference. Use `Customer.Id` from that object for `CustomerRef.value`.",
19-
type: "string",
17+
propDefinition: [
18+
quickbooks,
19+
"customer",
20+
],
2021
},
2122
customerRefName: {
2223
propDefinition: [

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

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ export default {
1010
props: {
1111
quickbooks,
1212
accountRefValue: {
13-
label: "Account Reference Value",
13+
propDefinition: [
14+
quickbooks,
15+
"accountIds",
16+
],
1417
type: "string",
18+
label: "Account Reference Value",
1519
description: "Specifies the id of the account reference. Check must specify bank account, CreditCard must specify credit card account. Validation Rules:Valid and Active Account Reference of an appropriate type.",
1620
},
1721
paymentType: {
@@ -37,22 +41,22 @@ export default {
3741
optional: true,
3842
},
3943
currencyRefValue: {
40-
label: "Currency Reference Value",
41-
type: "string",
42-
description: "A three letter string representing the ISO 4217 code for the currency. For example, `USD`, `AUD`, `EUR`, and so on. This must be defined if multicurrency is enabled for the company.\nMulticurrency is enabled for the company if `Preferences.MultiCurrencyEnabled` is set to `true`. Read more about multicurrency support [here](https://developer.intuit.com/docs?RedirectID=MultCurrencies). Required if multicurrency is enabled for the company.",
43-
optional: true,
44+
propDefinition: [
45+
quickbooks,
46+
"currencyRefValue",
47+
],
4448
},
4549
currencyRefName: {
46-
label: "Currency Reference Name",
47-
type: "object",
48-
description: "The full name of the currency.",
49-
optional: true,
50+
propDefinition: [
51+
quickbooks,
52+
"currencyRefName",
53+
],
5054
},
51-
minorversion: {
52-
label: "Minor Version",
53-
type: "string",
54-
description: "Use the minorversion query parameter in REST API requests to access a version of the API other than the generally available version. For example, to invoke minor version 1 of the JournalEntry entity, issue the following request:\n`https://quickbooks.api.intuit.com/v3/company/<realmId>/journalentry/entityId?minorversion=1`",
55-
optional: true,
55+
minorVersion: {
56+
propDefinition: [
57+
quickbooks,
58+
"minorVersion",
59+
],
5660
},
5761
},
5862
async run({ $ }) {

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ export default {
1414
"purchaseId",
1515
],
1616
},
17-
minorversion: {
18-
label: "Minor Version",
19-
type: "string",
20-
description: "Use the minorversion query parameter in REST API requests to access a version of the API other than the generally available version. For example, to invoke minor version 1 of the JournalEntry entity, issue the following request:\n`https://quickbooks.api.intuit.com/v3/company/<realmId>/journalentry/entityId?minorversion=1`",
21-
optional: true,
17+
minorVersion: {
18+
propDefinition: [
19+
quickbooks,
20+
"minorVersion",
21+
],
2222
},
2323
},
2424
async run({ $ }) {

components/quickbooks/actions/get-bill/get-bill.mjs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ export default {
1010
props: {
1111
quickbooks,
1212
billId: {
13-
label: "Bill ID",
14-
type: "string",
15-
description: "Id of the bill to get details of.",
13+
propDefinition: [
14+
quickbooks,
15+
"billId",
16+
],
1617
},
1718
minorVersion: {
1819
propDefinition: [

components/quickbooks/actions/get-customer/get-customer.mjs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ export default {
1010
props: {
1111
quickbooks,
1212
customerId: {
13-
label: "Customer ID",
14-
type: "string",
15-
description: "Id of the account to get details of.",
13+
propDefinition: [
14+
quickbooks,
15+
"customer",
16+
],
1617
},
1718
minorVersion: {
1819
propDefinition: [

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ export default {
1010
props: {
1111
quickbooks,
1212
invoiceId: {
13-
label: "Invoice ID",
14-
type: "string",
15-
description: "Id of the invoice to get details of.",
16-
optional: true,
13+
propDefinition: [
14+
quickbooks,
15+
"invoiceId",
16+
],
1717
},
1818
minorVersion: {
1919
propDefinition: [

components/quickbooks/actions/get-purchase-order/get-purchase-order.mjs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ export default {
1010
props: {
1111
quickbooks,
1212
purchaseOrderId: {
13-
label: "Purchase Order ID",
14-
type: "string",
15-
description: "Id of the purchase order to get details of.",
13+
propDefinition: [
14+
quickbooks,
15+
"purchaseOrderId",
16+
],
1617
},
1718
minorVersion: {
1819
propDefinition: [

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ export default {
1010
props: {
1111
quickbooks,
1212
purchaseId: {
13-
label: "Purchase ID",
14-
type: "string",
15-
description: "Id of the purchase to get details of.",
13+
propDefinition: [
14+
quickbooks,
15+
"purchaseId",
16+
],
1617
},
1718
minorVersion: {
1819
propDefinition: [
@@ -28,7 +29,7 @@ export default {
2829

2930
const response = await this.quickbooks.getPurchase({
3031
$,
31-
purchaseId: this.purchaseId,
32+
purchaseId: this.purchaseId?.value ?? this.purchaseId,
3233
params: {
3334
minorversion: this.minorVersion,
3435
},

0 commit comments

Comments
 (0)