-
Notifications
You must be signed in to change notification settings - Fork 10
/
index.js
104 lines (101 loc) · 3.17 KB
/
index.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
const Customer = require('./lib/customer'),
Company = require('./lib/company'),
Currency = require('./lib/currency'),
Employee = require('./lib/employee'),
UserFile = require('./lib/userFile'),
ResourceGroup = require('./lib/resourceGroup'),
Supplier = require('./lib/supplier'),
SalesTerritory = require('./lib/salesTerritory'),
Jobs = require('./lib/jobs'),
JobOperations = require('./lib/jobOperations'),
ServiceBase = require('./lib/serviceBase'),
Labor = require('./lib/labor'),
LaborApproval = require('./lib/laborApproval'),
SalesOrder = require('./lib/salesOrder'),
Task = require('./lib/task'),
OrderJobWiz = require('./lib/orderJobWiz'),
BAQ = require('./lib/baq'),
Connection = require('./lib/connection'),
PurchaseOrder = require('./lib/purchaseOrder'),
DynamicQuery = require('./lib/dynamicQuery'),
Project = require('./lib/project'),
UD15 = require('./lib/ud15'),
JobProdSearch = require('./lib/jobProdSearch'),
Part = require('./lib/part'),
JobClosing = require('./lib/jobClosing'),
JobAdjustment = require('./lib/jobAdjustment');
function Epicor({ serverUrl, username, password, company, strictSSL }) {
const connection = new Connection({
serverUrl,
username,
password,
company,
strictSSL
});
this.getConnection = () => connection;
this.setConnectionCompany = company => {
connection.company = company;
};
this.getConnectionCompany = () => connection.company;
this.Currency = new Currency(connection);
this.Customer = new Customer(connection);
this.Indirect = new ServiceBase(
connection,
'Erp.BO.IndirectSvc',
'Indirect',
'IndirectCode'
);
this.Reason = new ServiceBase(
connection,
'Erp.BO.ReasonSvc',
'Reason',
'ReasonCode'
);
this.PerCon = new ServiceBase(
connection,
'Erp.BO.PerConSvc',
'PerCon',
'PerConID'
);
this.Image = new ServiceBase(
connection,
'Erp.BO.ImageSvc',
'Image',
'ImageID'
);
this.ResourceGroup = new ResourceGroup(connection);
this.SalesTerritory = new SalesTerritory(connection);
this.ShipVia = new ServiceBase(
connection,
'Erp.BO.ShipViaSvc',
'ShipVia',
'ShipViaCode'
);
this.Supplier = new Supplier(connection);
this.Terms = new ServiceBase(
connection,
'Erp.BO.TermsSvc',
'Terms',
'TermsCode'
);
this.Employee = new Employee(connection);
this.SalesOrder = new SalesOrder(connection);
this.OrderJobWiz = new OrderJobWiz(connection);
this.UserFile = new UserFile(connection);
this.JobOperations = new JobOperations(connection);
this.Jobs = new Jobs(connection);
this.Task = new Task(connection);
this.Labor = new Labor(connection);
this.LaborApproval = new LaborApproval(connection);
this.BAQ = new BAQ(connection);
this.Company = new Company(connection);
this.PurchaseOrder = new PurchaseOrder(connection);
this.DynamicQuery = new DynamicQuery(connection);
this.Project = new Project(connection);
this.UD15 = new UD15(connection);
this.JobProdSearch = new JobProdSearch(connection);
this.Part = new Part(connection);
this.JobClosing = new JobClosing(connection);
this.JobAdjustment = new JobAdjustment(connection);
}
module.exports = Epicor;