sdx-mailer-sdk 1.0.13 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/CourierMail.js +5 -2
package/package.json
CHANGED
package/src/CourierMail.js
CHANGED
|
@@ -6,6 +6,9 @@ const CourierService = require("./services/CourierService");
|
|
|
6
6
|
const Commons = require("./utils/Commons");
|
|
7
7
|
|
|
8
8
|
class CourierMail {
|
|
9
|
+
|
|
10
|
+
static BASE_PATH = '/v1/courier'
|
|
11
|
+
|
|
9
12
|
constructor() {
|
|
10
13
|
this.service = new CourierService();
|
|
11
14
|
}
|
|
@@ -37,7 +40,7 @@ class CourierMail {
|
|
|
37
40
|
* @returns
|
|
38
41
|
*/
|
|
39
42
|
async sendCourierMail(basicAuth, endpoint, tokenRQ, productId, isBasic) {
|
|
40
|
-
const url = endpoint +
|
|
43
|
+
const url = endpoint + BASE_PATH + (isBasic ? '/basic' : '');
|
|
41
44
|
if (!Commons.validField(tokenRQ.trx)) {
|
|
42
45
|
throw WebServiceException.BAD_REQUEST("Request must be signed");
|
|
43
46
|
}
|
|
@@ -45,7 +48,7 @@ class CourierMail {
|
|
|
45
48
|
}
|
|
46
49
|
|
|
47
50
|
async sendExceptionMail(basicAuth, endpoint, tokenRQ, productId) {
|
|
48
|
-
const url = endpoint + '/exceptions';
|
|
51
|
+
const url = endpoint + BASE_PATH + '/exceptions';
|
|
49
52
|
if (!Commons.validField(tokenRQ.trx)) {
|
|
50
53
|
throw WebServiceException.BAD_REQUEST("Request must be signed");
|
|
51
54
|
}
|