-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.js
More file actions
21 lines (18 loc) · 898 Bytes
/
index.js
File metadata and controls
21 lines (18 loc) · 898 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const Faxes = require('./src/faxes');
const Public = require('./src/public');
const Account = require('./src/account');
const PhaxCode = require('./src/phax-code');
const PhoneNumber = require('./src/phone-number');
module.exports = class {
constructor(apiKey, apiSecret, minTLSVersion) {
this.apiKey = apiKey;
this.apiSecret = apiSecret;
this.url = 'https://api.phaxio.com/v2.1';
this.agentOptions = { minVersion: minTLSVersion || 'TLSv1.2' };
this.public = new Public(this.url, this.agentOptions);
this.faxes = new Faxes(this.apiKey, this.apiSecret, this.url, this.agentOptions);
this.account = new Account(this.apiKey, this.apiSecret, this.url, this.agentOptions);
this.phaxCode = new PhaxCode(this.apiKey, this.apiSecret, this.url, this.agentOptions);
this.phoneNumber = new PhoneNumber(this.apiKey, this.apiSecret, this.url, this.agentOptions);
}
};