-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.js
43 lines (39 loc) · 860 Bytes
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
require('dotenv').config();
var MSTeamsLogger = require('.');
var logger = new MSTeamsLogger(
process.env.MSTEAMS_WEBHOOK_URL,
"test environment",
"Apigrate Time-Tracking App",
{
author_url: "http://documentation.about.invoice.integration",
fields: {
build: "2022.001",
branch: "main"
}
}
);
// basic
// logger.log(
// true,
// 'That worked.'
// );
//success, summary, details, fields
logger.log(
true,
'Invoice Created.',
'Found customer.\nThere are 3 invoice lines.\nThe total amount is $107.80',
{
customer_id: 28390,
invoice_id: 123789
}
);
logger.log(
false,
'Invoice was not created.',
'Found customer.\nException processing invoice lines.\nThe quantity is missing for the line with product 1234879.',
{
customer_id: 28390,
product_id: 1234879,
product_sku: 'TS4921'
}
);