Skip to content

Commit b600480

Browse files
committed
Change name and description from dynamic to static
1 parent ce53add commit b600480

File tree

2 files changed

+2
-21
lines changed

2 files changed

+2
-21
lines changed

components/quickbooks/sources/common.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,6 @@ module.exports = {
179179
return supportedWebhookOptions[entityName];
180180
},
181181

182-
getOperationsDescription(operations) {
183-
return this.toReadableList(this.toPastTense(operations));
184-
},
185-
186182
toPastTense(operations) {
187183
const pastTenseVersion = {
188184
Create: "Created",
@@ -199,20 +195,6 @@ module.exports = {
199195
}
200196
},
201197

202-
toReadableList(array) {
203-
// converts an array to a readable list like this:
204-
// ['Created', 'Updated', 'Merged'] => 'Created, Updated, or Merged'
205-
const list = array.join(", ");
206-
const indexAfterLastComma = list.lastIndexOf(",") + 1;
207-
if (indexAfterLastComma === 0) {
208-
//no commas were found so just return the list
209-
return list;
210-
} else {
211-
//add an 'or' after the last comma
212-
return list.slice(0, indexAfterLastComma) + " or" + list.slice(indexAfterLastComma);
213-
}
214-
},
215-
216198
sendHttpResponse(event, entities) {
217199
this.http.respond({
218200
status: 200,

components/quickbooks/sources/new-or-modified-customer/new-or-modified-customer.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@ const common = require("../common");
44
const sourceEntity = "Customer";
55

66
const supportedOperations = common.methods.getSupportedOperations(sourceEntity);
7-
const supportedOperationsList = common.methods.getOperationsDescription(supportedOperations);
87

98
module.exports = {
109
...common,
1110
key: "quickbooks-new-or-modified-customer",
12-
name: `New or Modified Customer (${supportedOperationsList})`,
13-
description: `Emit Customers that are ${supportedOperationsList.toLowerCase()}. Visit the documentation page to learn how to configure webhooks for your QuickBooks company: https://developer.intuit.com/app/developer/qbo/docs/develop/webhooks`,
11+
name: "New or Modified Customer (Created, Updated, Merged or Deleted)",
12+
description: "Emit new or modified customers. Visit the documentation page to learn how to configure webhooks for your QuickBooks company: https://developer.intuit.com/app/developer/qbo/docs/develop/webhooks",
1413
version: "0.0.1",
1514
type: "source",
1615
props: {

0 commit comments

Comments
 (0)