Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions components/quickbooks/actions/create-bill/create-bill.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@ import quickbooks from "../../quickbooks.app.mjs";
export default {
key: "quickbooks-create-bill",
name: "Create Bill",
description: "Creates a bill. [See docs here](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/bill#create-a-bill)",
description: "Creates a bill. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/bill#create-a-bill)",
version: "0.1.6",
type: "action",
props: {
quickbooks,
vendorRefValue: {
label: "Vendor Ref Value",
propDefinition: [
quickbooks,
"vendorIds",
],
type: "string",
label: "Vendor Ref Value",
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`.",
},
lineItems: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import quickbooks from "../../quickbooks.app.mjs";
export default {
key: "quickbooks-create-customer",
name: "Create Customer",
description: "Creates a customer. [See docs here](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/customer#create-a-customer)",
description: "Creates a customer. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/customer#create-a-customer)",
version: "0.1.6",
type: "action",
props: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import quickbooks from "../../quickbooks.app.mjs";
export default {
key: "quickbooks-create-invoice",
name: "Create Invoice",
description: "Creates an invoice. [See docs here](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#create-an-invoice)",
description: "Creates an invoice. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#create-an-invoice)",
version: "0.1.6",
type: "action",
props: {
Expand All @@ -16,9 +16,10 @@ export default {
],
},
customerRefValue: {
label: "Customer Reference Value",
type: "string",
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`.",
propDefinition: [
quickbooks,
"customer",
],
},
customerRefName: {
propDefinition: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import quickbooks from "../../quickbooks.app.mjs";
export default {
key: "quickbooks-create-payment",
name: "Create Payment",
description: "Creates a payment. [See docs here](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/payment#create-a-payment)",
description: "Creates a payment. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/payment#create-a-payment)",
version: "0.0.5",
type: "action",
props: {
Expand All @@ -14,9 +14,10 @@ export default {
type: "string",
},
customerRefValue: {
label: "Customer Reference Value",
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`.",
type: "string",
propDefinition: [
quickbooks,
"customer",
],
},
customerRefName: {
propDefinition: [
Expand Down
35 changes: 19 additions & 16 deletions components/quickbooks/actions/create-purchase/create-purchase.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@ import quickbooks from "../../quickbooks.app.mjs";
export default {
key: "quickbooks-create-purchase",
name: "Create Purchase",
description: "Creates a new purchase. [See docs here](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchase#create-a-purchase)",
description: "Creates a new purchase. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchase#create-a-purchase)",
version: "0.0.4",
type: "action",
props: {
quickbooks,
accountRefValue: {
label: "Account Reference Value",
propDefinition: [
quickbooks,
"accountIds",
],
type: "string",
label: "Account Reference Value",
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.",
},
paymentType: {
Expand All @@ -37,26 +41,25 @@ export default {
optional: true,
},
currencyRefValue: {
label: "Currency Reference Value",
type: "string",
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.",
optional: true,
propDefinition: [
quickbooks,
"currencyRefValue",
],
},
currencyRefName: {
label: "Currency Reference Name",
type: "object",
description: "The full name of the currency.",
optional: true,
propDefinition: [
quickbooks,
"currencyRefName",
],
},
minorversion: {
label: "Minor Version",
type: "string",
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`",
optional: true,
minorVersion: {
propDefinition: [
quickbooks,
"minorVersion",
],
},
},
async run({ $ }) {

let parsedLineItems = parseOne(this.lineItems);

const response = await this.quickbooks.createPurchase({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import quickbooks from "../../quickbooks.app.mjs";
export default {
key: "quickbooks-delete-purchase",
name: "Delete Purchase",
description: "Delete a specific purchase. [See docs here](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchase#delete-a-purchase)",
description: "Delete a specific purchase. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchase#delete-a-purchase)",
version: "0.0.4",
type: "action",
props: {
Expand All @@ -14,11 +14,11 @@ export default {
"purchaseId",
],
},
minorversion: {
label: "Minor Version",
type: "string",
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`",
optional: true,
minorVersion: {
propDefinition: [
quickbooks,
"minorVersion",
],
},
},
async run({ $ }) {
Expand Down
9 changes: 5 additions & 4 deletions components/quickbooks/actions/get-bill/get-bill.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ import quickbooks from "../../quickbooks.app.mjs";
export default {
key: "quickbooks-get-bill",
name: "Get Bill",
description: "Returns info about a bill. [See docs here](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/bill#read-a-bill)",
description: "Returns info about a bill. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/bill#read-a-bill)",
version: "0.1.6",
type: "action",
props: {
quickbooks,
billId: {
label: "Bill ID",
type: "string",
description: "Id of the bill to get details of.",
propDefinition: [
quickbooks,
"billId",
],
},
minorVersion: {
propDefinition: [
Expand Down
9 changes: 5 additions & 4 deletions components/quickbooks/actions/get-customer/get-customer.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ import quickbooks from "../../quickbooks.app.mjs";
export default {
key: "quickbooks-get-customer",
name: "Get Customer",
description: "Returns info about a customer. [See docs here](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/most-commonly-used/customer#read-a-customer)",
description: "Returns info about a customer. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/most-commonly-used/customer#read-a-customer)",
version: "0.3.6",
type: "action",
props: {
quickbooks,
customerId: {
label: "Customer ID",
type: "string",
description: "Id of the account to get details of.",
propDefinition: [
quickbooks,
"customer",
],
},
minorVersion: {
propDefinition: [
Expand Down
10 changes: 5 additions & 5 deletions components/quickbooks/actions/get-invoice/get-invoice.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ import quickbooks from "../../quickbooks.app.mjs";
export default {
key: "quickbooks-get-invoice",
name: "Get Invoice",
description: "Returns info about an invoice. [See docs here](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#read-an-invoice)",
description: "Returns info about an invoice. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#read-an-invoice)",
version: "0.2.7",
type: "action",
props: {
quickbooks,
invoiceId: {
label: "Invoice ID",
type: "string",
description: "Id of the invoice to get details of.",
optional: true,
propDefinition: [
quickbooks,
"invoiceId",
],
},
minorVersion: {
propDefinition: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ import quickbooks from "../../quickbooks.app.mjs";
export default {
key: "quickbooks-get-my-company",
name: "Get My Company",
description: "Gets info about a company. [See docs here](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/companyinfo)",
description: "Gets info about a company. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/companyinfo)",
version: "0.1.6",
type: "action",
props: {
quickbooks,
},
async run({ $ }) {

const response = await this.quickbooks.getMyCompany({
$,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ import quickbooks from "../../quickbooks.app.mjs";
export default {
key: "quickbooks-get-purchase-order",
name: "Get Purchase Order",
description: "Returns details about a purchase order. [See docs here](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchaseorder#read-a-purchase-order)",
description: "Returns details about a purchase order. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchaseorder#read-a-purchase-order)",
version: "0.1.6",
type: "action",
props: {
quickbooks,
purchaseOrderId: {
label: "Purchase Order ID",
type: "string",
description: "Id of the purchase order to get details of.",
propDefinition: [
quickbooks,
"purchaseOrderId",
],
},
minorVersion: {
propDefinition: [
Expand Down
11 changes: 6 additions & 5 deletions components/quickbooks/actions/get-purchase/get-purchase.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ import quickbooks from "../../quickbooks.app.mjs";
export default {
key: "quickbooks-get-purchase",
name: "Get Purchase",
description: "Returns info about a purchase. [See docs here](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchase#read-a-purchase)",
description: "Returns info about a purchase. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchase#read-a-purchase)",
version: "0.1.6",
type: "action",
props: {
quickbooks,
purchaseId: {
label: "Purchase ID",
type: "string",
description: "Id of the purchase to get details of.",
propDefinition: [
quickbooks,
"purchaseId",
],
},
minorVersion: {
propDefinition: [
Expand All @@ -28,7 +29,7 @@ export default {

const response = await this.quickbooks.getPurchase({
$,
purchaseId: this.purchaseId,
purchaseId: this.purchaseId?.value ?? this.purchaseId,
params: {
minorversion: this.minorVersion,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ import quickbooks from "../../quickbooks.app.mjs";
export default {
key: "quickbooks-get-sales-receipt",
name: "Get Sales Receipt",
description: "Returns details about a sales receipt. [See docs here](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/salesreceipt#read-a-salesreceipt)",
description: "Returns details about a sales receipt. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/salesreceipt#read-a-salesreceipt)",
version: "0.1.6",
type: "action",
props: {
quickbooks,
salesReceiptId: {
label: "sales Receipt ID",
type: "string",
description: "Id of the sales receipt to get details of.",
propDefinition: [
quickbooks,
"salesReceiptId",
],
},
minorVersion: {
propDefinition: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ import quickbooks from "../../quickbooks.app.mjs";
export default {
key: "quickbooks-get-time-activity",
name: "Get Time Activity",
description: "Returns info about an activity. [See docs here](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/timeactivity#read-a-timeactivity-object)",
description: "Returns info about an activity. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/timeactivity#read-a-timeactivity-object)",
version: "0.1.6",
type: "action",
props: {
quickbooks,
timeActivityId: {
label: "Time Activity ID",
type: "string",
description: "Id of the time activity object to get details of.",
propDefinition: [
quickbooks,
"timeActivityId",
],
},
minorVersion: {
propDefinition: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import quickbooks from "../../quickbooks.app.mjs";
export default {
key: "quickbooks-search-accounts",
name: "Search Accounts",
description: "Search for accounts. [See docs here](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/account#query-an-account)",
description: "Search for accounts. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/account#query-an-account)",
version: "0.2.6",
type: "action",
props: {
Expand Down Expand Up @@ -53,22 +53,21 @@ export default {
throw new ConfigurationError("Must provide includeClause, whereClause parameters.");
}

var orderClause = "";
let orderClause = "";
if (this.orderClause) {
orderClause = ` ORDERBY ${this.orderClause}`;
}

var startPosition = "";
let startPosition = "";
if (this.startPosition) {
startPosition = ` STARTPOSITION ${this.startPosition}`;
}

var maxResults = "";
let maxResults = "";
if (this.maxResults) {
maxResults = ` MAXRESULTS ${this.maxResults}` || "";
}

//Prepares the request's query parameter
const query = `select ${this.includeClause} from Account where ${this.whereClause}${orderClause}${startPosition}${maxResults}`;

const response = await this.quickbooks.query({
Expand Down
Loading
Loading