@longvansoftware/service-js-client 1.17.1 → 1.17.2
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.
|
@@ -472,4 +472,5 @@ export declare class OrderService extends Service {
|
|
|
472
472
|
findCampaignActionGiftVoucher(): Promise<any>;
|
|
473
473
|
addProductGiftPromotion(orderId: string, updatedBy: string, data: any): Promise<any>;
|
|
474
474
|
removeProductGiftPromotion(orderId: string, orderLineItemId: string): Promise<any>;
|
|
475
|
+
checkNewCustomer(orderId: string, customer_id: string): Promise<any>;
|
|
475
476
|
}
|
|
@@ -1313,5 +1313,22 @@ class OrderService extends serviceSDK_1.Service {
|
|
|
1313
1313
|
}
|
|
1314
1314
|
});
|
|
1315
1315
|
}
|
|
1316
|
+
checkNewCustomer(orderId, customer_id) {
|
|
1317
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1318
|
+
console.log("🚀 ~ OrderService ~ removeProductGiftPromotion ~ orderLineItemId:", customer_id);
|
|
1319
|
+
console.log("🚀 ~ OrderService ~ removeProductGiftPromotion ~ orderId:", orderId);
|
|
1320
|
+
const endpoint = `/front/orders/${this.orgId}/${customer_id}/${orderId}/newCustomer`;
|
|
1321
|
+
const method = "GET";
|
|
1322
|
+
try {
|
|
1323
|
+
const response = yield this.restApiCallWithToken(endpoint, method);
|
|
1324
|
+
console.log(response);
|
|
1325
|
+
return response;
|
|
1326
|
+
}
|
|
1327
|
+
catch (error) {
|
|
1328
|
+
console.log(`Error in removeProductGiftPromotion: ${error}`);
|
|
1329
|
+
throw error;
|
|
1330
|
+
}
|
|
1331
|
+
});
|
|
1332
|
+
}
|
|
1316
1333
|
}
|
|
1317
1334
|
exports.OrderService = OrderService;
|