File tree Expand file tree Collapse file tree 11 files changed +29
-37
lines changed
components/quickbooks/actions Expand file tree Collapse file tree 11 files changed +29
-37
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,6 @@ export default {
5656 } ,
5757 } ,
5858 async run ( { $ } ) {
59-
6059 let parsedLineItems = parseOne ( this . lineItems ) ;
6160
6261 const response = await this . quickbooks . createPurchase ( {
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ export default {
1010 quickbooks,
1111 } ,
1212 async run ( { $ } ) {
13-
1413 const response = await this . quickbooks . getMyCompany ( {
1514 $,
1615 } ) ;
Original file line number Diff line number Diff line change @@ -53,22 +53,21 @@ export default {
5353 throw new ConfigurationError ( "Must provide includeClause, whereClause parameters." ) ;
5454 }
5555
56- var orderClause = "" ;
56+ let orderClause = "" ;
5757 if ( this . orderClause ) {
5858 orderClause = ` ORDERBY ${ this . orderClause } ` ;
5959 }
6060
61- var startPosition = "" ;
61+ let startPosition = "" ;
6262 if ( this . startPosition ) {
6363 startPosition = ` STARTPOSITION ${ this . startPosition } ` ;
6464 }
6565
66- var maxResults = "" ;
66+ let maxResults = "" ;
6767 if ( this . maxResults ) {
6868 maxResults = ` MAXRESULTS ${ this . maxResults } ` || "" ;
6969 }
7070
71- //Prepares the request's query parameter
7271 const query = `select ${ this . includeClause } from Account where ${ this . whereClause } ${ orderClause } ${ startPosition } ${ maxResults } ` ;
7372
7473 const response = await this . quickbooks . query ( {
Original file line number Diff line number Diff line change @@ -53,22 +53,21 @@ export default {
5353 throw new ConfigurationError ( "Must provide includeClause, whereClause parameters." ) ;
5454 }
5555
56- var orderClause = "" ;
56+ let orderClause = "" ;
5757 if ( this . orderClause ) {
5858 orderClause = ` ORDERBY ${ this . orderClause } ` ;
5959 }
6060
61- var startPosition = "" ;
61+ let startPosition = "" ;
6262 if ( this . startPosition ) {
6363 startPosition = ` STARTPOSITION ${ this . startPosition } ` ;
6464 }
6565
66- var maxResults = "" ;
66+ let maxResults = "" ;
6767 if ( this . maxResults ) {
6868 maxResults = ` MAXRESULTS ${ this . maxResults } ` || "" ;
6969 }
7070
71- //Prepares the request's query parameter
7271 const query = `select ${ this . includeClause } from Customer where ${ this . whereClause } ${ orderClause } ${ startPosition } ${ maxResults } ` ;
7372
7473 const response = await this . quickbooks . query ( {
Original file line number Diff line number Diff line change @@ -55,22 +55,21 @@ export default {
5555
5656 //Prepares OrderBy clause,start position, max results
5757 // parameters to be used in the request's query parameter.
58- var orderClause = "" ;
58+ let orderClause = "" ;
5959 if ( this . orderClause ) {
6060 orderClause = ` ORDERBY ${ this . orderClause } ` ;
6161 }
6262
63- var startPosition = "" ;
63+ let startPosition = "" ;
6464 if ( this . startPosition ) {
6565 startPosition = ` STARTPOSITION ${ this . startPosition } ` ;
6666 }
6767
68- var maxResults = "" ;
68+ let maxResults = "" ;
6969 if ( this . maxResults ) {
7070 maxResults = ` MAXRESULTS ${ this . maxResults } ` || "" ;
7171 }
7272
73- //Prepares the request's query parameter
7473 const query = `select ${ this . includeClause } from Invoice where ${ this . whereClause } ${ orderClause } ${ startPosition } ${ maxResults } ` ;
7574
7675 const response = await this . quickbooks . query ( {
Original file line number Diff line number Diff line change @@ -53,22 +53,21 @@ export default {
5353 throw new ConfigurationError ( "Must provide includeClause, whereClause parameters." ) ;
5454 }
5555
56- var orderClause = "" ;
56+ let orderClause = "" ;
5757 if ( this . orderClause ) {
5858 orderClause = ` ORDERBY ${ this . orderClause } ` ;
5959 }
6060
61- var startPosition = "" ;
61+ let startPosition = "" ;
6262 if ( this . startPosition ) {
6363 startPosition = ` STARTPOSITION ${ this . startPosition } ` ;
6464 }
6565
66- var maxResults = "" ;
66+ let maxResults = "" ;
6767 if ( this . maxResults ) {
6868 maxResults = ` MAXRESULTS ${ this . maxResults } ` || "" ;
6969 }
7070
71- //Prepares the request's query parameter
7271 const query = `select ${ this . includeClause } from Item where ${ this . whereClause } ${ orderClause } ${ startPosition } ${ maxResults } ` ;
7372
7473 const response = await this . quickbooks . query ( {
Original file line number Diff line number Diff line change @@ -53,22 +53,21 @@ export default {
5353 throw new ConfigurationError ( "Must provide includeClause, whereClause parameters." ) ;
5454 }
5555
56- var orderClause = "" ;
56+ let orderClause = "" ;
5757 if ( this . orderClause ) {
5858 orderClause = ` ORDERBY ${ this . orderClause } ` ;
5959 }
6060
61- var startPosition = "" ;
61+ let startPosition = "" ;
6262 if ( this . startPosition ) {
6363 startPosition = ` STARTPOSITION ${ this . startPosition } ` ;
6464 }
6565
66- var maxResults = "" ;
66+ let maxResults = "" ;
6767 if ( this . maxResults ) {
6868 maxResults = ` MAXRESULTS ${ this . maxResults } ` || "" ;
6969 }
7070
71- //Prepares the request's query parameter
7271 const query = `select ${ this . includeClause } from Item where Type = 'Inventory' and ${ this . whereClause } ${ orderClause } ${ startPosition } ${ maxResults } ` ;
7372
7473 const response = await this . quickbooks . query ( {
Original file line number Diff line number Diff line change @@ -46,17 +46,17 @@ export default {
4646 whereClause = ` WHERE ${ this . whereClause } ` ;
4747 }
4848
49- var orderClause = "" ;
49+ let orderClause = "" ;
5050 if ( this . orderClause ) {
5151 orderClause = ` ORDERBY ${ this . orderClause } ` ;
5252 }
5353
54- var startPosition = "" ;
54+ let startPosition = "" ;
5555 if ( this . startPosition ) {
5656 startPosition = ` STARTPOSITION ${ this . startPosition } ` ;
5757 }
5858
59- var maxResults = "" ;
59+ let maxResults = "" ;
6060 if ( this . maxResults ) {
6161 maxResults = ` MAXRESULTS ${ this . maxResults } ` || "" ;
6262 }
Original file line number Diff line number Diff line change 11import quickbooks from "../../quickbooks.app.mjs" ;
2+ import { ConfigurationError } from "@pipedream/platform" ;
23
34export default {
45 key : "quickbooks-search-services" ,
@@ -49,20 +50,20 @@ export default {
4950 } ,
5051 async run ( { $ } ) {
5152 if ( ! this . include_clause || ! this . where_clause ) {
52- throw new Error ( "Must provide include_clause, where_clause parameters." ) ;
53+ throw new ConfigurationError ( "Must provide include_clause, where_clause parameters." ) ;
5354 }
5455
55- var orderClause = "" ;
56+ let orderClause = "" ;
5657 if ( this . order_clause ) {
5758 orderClause = ` ORDERBY ${ this . order_clause } ` ;
5859 }
5960
60- var startPosition = "" ;
61+ let startPosition = "" ;
6162 if ( this . start_position ) {
6263 startPosition = ` STARTPOSITION ${ this . start_position } ` ;
6364 }
6465
65- var maxResults = "" ;
66+ let maxResults = "" ;
6667 if ( this . max_results ) {
6768 maxResults = ` MAXRESULTS ${ this . max_results } ` || "" ;
6869 }
Original file line number Diff line number Diff line change @@ -53,22 +53,21 @@ export default {
5353 throw new ConfigurationError ( "Must provide includeClause, whereClause parameters." ) ;
5454 }
5555
56- var orderClause = "" ;
56+ let orderClause = "" ;
5757 if ( this . orderClause ) {
5858 orderClause = ` ORDERBY ${ this . orderClause } ` ;
5959 }
6060
61- var startPosition = "" ;
61+ let startPosition = "" ;
6262 if ( this . startPosition ) {
6363 startPosition = ` STARTPOSITION ${ this . startPosition } ` ;
6464 }
6565
66- var maxResults = "" ;
66+ let maxResults = "" ;
6767 if ( this . maxResults ) {
6868 maxResults = ` MAXRESULTS ${ this . maxResults } ` || "" ;
6969 }
7070
71- //Prepares the request's query parameter
7271 const query = `select ${ this . includeClause } from TimeActivity where ${ this . whereClause } ${ orderClause } ${ startPosition } ${ maxResults } ` ;
7372
7473 const response = await this . quickbooks . query ( {
You can’t perform that action at this time.
0 commit comments