From 16ea296b3571ed2d90b6d81ccb1106957c8283d9 Mon Sep 17 00:00:00 2001 From: Nattapon W Date: Tue, 13 Jul 2021 18:24:29 +0700 Subject: [PATCH] update mockup true --- app.js | 11 +++++++++++ ccbs.js | 8 ++++++-- crmasset.js | 547 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ int.js | 540 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1104 insertions(+), 2 deletions(-) create mode 100644 crmasset.js create mode 100644 int.js diff --git a/app.js b/app.js index f14740f..5747101 100644 --- a/app.js +++ b/app.js @@ -400,6 +400,17 @@ app.get('/goapi/profile/external/customer/usageInfo/:type/:number', require('./c app.post('/v1/OSBCOM/BillingProfileInfo/UsageProfileInfoREST/getAccumulationUOMGroupList/', require('./ccbs').accumulationUOMGroupList); app.post('/CCBSCommonInfo/MGCommonInfo/getPrimaryKeyListWithoutResourceType', require('./ccbs').getPrimaryKeyListWithoutResourceType); +app.post('/CRMIAsset/getAssetComponentList', require('./crmasset').getAssetComponentList); + +app.post('/MGOfferInfo/MGOfferInfo/getAllDiscountList', require('./int').getAllDiscountList); +app.post('/MGOfferInfo/MGOfferInfo/getFuturePromotionList', require('./int').getFuturePromotionList); +app.post('/MGOfferInfo/NativeOfferInfo/getCurrentCUGList', require('./int').getCurrentCUGList); +app.post('/MGOfferInfo/NativeOfferInfo/getCurrentFriendFamilyList', require('./int').getCurrentFriendFamilyList); +app.post('/MGOfferInfo/NativeOfferInfo/getCurrentSpendingLimitList', require('./int').getCurrentSpendingLimitList); +app.post('/MGOfferInfo/NativeOfferInfo/getCurrentCreditLimitAtSubList', require('./int').getCurrentCreditLimitAtSubList); +app.post('/MGOfferInfo/NativeOfferInfo/getCurrentSplitChargeInfo', require('./int').getCurrentSplitChargeInfo); + + app.get('/api/callback', require('./line').callback); app.get('/api/random/leader', function (req, res) { diff --git a/ccbs.js b/ccbs.js index 3041749..05f46a2 100644 --- a/ccbs.js +++ b/ccbs.js @@ -101,10 +101,12 @@ module.exports.churnScoreOfferList = async (req, res) => { let responseErr = { "code": "404", - "message": "Not found" + "msg": "Not found" } let response = { + "code": "0", + "msg": "Success", "campTransID": "5c0a746b-ae69-447d-84b0-b0bdaa4b6add", "campID": "0007", "campCode": "PRPTOL000001", @@ -139,10 +141,12 @@ module.exports.usageInfo = async (req, res) => { let responseErr = { "code": "404", - "message": "Not found" + "msg": "Not found" } let response = { + "code": "0", + "msg": "Success", "trueId": { "device": "WEB", "lastAccess": "27/12/2018 04:51:12" diff --git a/crmasset.js b/crmasset.js new file mode 100644 index 0000000..dab71ea --- /dev/null +++ b/crmasset.js @@ -0,0 +1,547 @@ +module.exports.getAssetComponentList = async (req, res) => { + console.log('===== POST getAssetComponentList =====') + console.log('url', req.originalUrl); + console.log('headers', req.headers); + console.log('query', req.query); + console.log('params', req.params); + console.log('body', req.body); + + let responseErr = { + "code": "5000", + "msg": "Error bind json to model" + } + + let response = { + "code": "0", + "msg": "Success", + "transID": "610d300c-f33c-4aa7-b640-bcddff7d7ddf", + "assetComponentList": [ + { + "assetRowID": "1-7STT9PJ", + "parAssetRowID": "1-6XIP5UU", + "rootAssetRowID": "1-6XIP5UU", + "assetNo": "CDC1392733125643171516804", + "partNum": "CD_12564317", + "offerCode": "BSP014", + "offerName": "BSP014-Advance payment-Advance payment", + "productRowID": "1-H2Y-65", + "productCategory": "External", + "productName": "12564317-BSP014", + "productType": "Discount", + "productLine": "True Mobile", + "effectiveDate": "2020-04-21T18:40:55.000+0700", + "expiryDate": "2020-09-06T00:00:00.000+0700", + "status": "Inactive", + "offerType": "Discount", + "chargePeriod": "Monthly" + }, + { + "assetRowID": "1-7KISY7T", + "parAssetRowID": "1-6XIP5UU", + "rootAssetRowID": "1-6XIP5UU", + "assetNo": "COC1392733134135251488290", + "partNum": "CO_13413525", + "offerCode": "BUA3GS58", + "offerName": "BUA3GS58-Free Net 12GB/month for 12 months-Free Net 12GB/month for 12 months", + "productRowID": "1-1HFW-680", + "productCategory": "External", + "productName": "13413525-BUA3GS58", + "productType": "SOC/OFFER", + "productLine": "True Mobile", + "effectiveDate": "2020-03-26T14:05:25.000+0700", + "expiryDate": "2021-04-09T23:59:59.000+0700", + "status": "Inactive" + }, + { + "assetRowID": "1-7KISY7X", + "parAssetRowID": "1-6XIP5UU", + "rootAssetRowID": "1-6XIP5UU", + "assetNo": "COC1392733162240291488289", + "partNum": "CO_16224029", + "offerCode": "RMV000000010410", + "offerName": "RMV000000010410-PRP_Proactive Voluntary Contract 12 months", + "productRowID": "1-1UPI-49", + "productCategory": "External", + "productName": "16224029-RMV000000010410", + "productType": "SOC/OFFER", + "productLine": "True Mobile", + "effectiveDate": "2020-03-26T14:05:15.000+0700", + "expiryDate": "2021-03-26T14:05:10.000+0700", + "status": "Inactive" + }, + { + "assetRowID": "1-7KHPX3D", + "parAssetRowID": "1-6XIP5UU", + "rootAssetRowID": "1-6XIP5UU", + "assetNo": "COC1392733136578271487938", + "partNum": "CO_13657827", + "offerCode": "BUNV1S41", + "offerName": "BUNV1S41-Free Voice all-net100mins/12M-Free Voice call100mins for 12months", + "productRowID": "1-1HG8-34", + "productCategory": "External", + "productName": "13657827-BUNV1S41", + "productType": "SOC/OFFER", + "productLine": "True Mobile", + "effectiveDate": "2020-03-26T11:04:29.000+0700", + "expiryDate": "2021-04-26T00:00:00.000+0700", + "status": "Inactive" + }, + { + "assetRowID": "1-75Y4CQP", + "parAssetRowID": "1-6XIP5UU", + "rootAssetRowID": "1-6XIP5UU", + "assetNo": "COC1392733125180251452980", + "partNum": "CO_12518025", + "offerCode": "RETENS83", + "offerName": "RETENS83-RET_Free Voice all-net550mins 6Months-Free Voice all-net550mins 6Months", + "productRowID": "1-177N-136", + "productCategory": "External", + "productName": "12518025-RETENS83", + "productType": "SOC/OFFER", + "productLine": "True Mobile", + "effectiveDate": "2020-02-06T17:25:44.000+0700", + "expiryDate": "2020-08-06T00:00:00.000+0700", + "status": "Inactive" + }, + { + "assetRowID": "1-75N9HNZ", + "parAssetRowID": "1-6XIP5UU", + "rootAssetRowID": "1-6XIP5UU", + "assetNo": "COC1392733415811440976", + "partNum": "CO_41581", + "offerCode": "PROINTL1", + "offerName": "PROINTL1-International Call Enabling-International Call Enabling", + "productRowID": "1-1TH-1866", + "productCategory": "External", + "productName": "41581-PROINTL1", + "productType": "SOC/OFFER", + "productLine": "True Mobile", + "effectiveDate": "2020-01-21T16:00:27.000+0700", + "status": "Active" + }, + { + "assetRowID": "1-75N9HNN", + "parAssetRowID": "1-6XIP5UU", + "rootAssetRowID": "1-6XIP5UU", + "assetNo": "COC13927331056451440977", + "partNum": "CO_105645", + "offerCode": "PROROAM2S", + "offerName": "PROROAM2S-Postpaid Roaming Limited Data Coverage-Provision - Postpay Roaming Limited Data Coverage", + "productRowID": "1-1TH-1608", + "productCategory": "External", + "productName": "105645-PROROAM2S", + "productType": "SOC/OFFER", + "productLine": "True Mobile", + "effectiveDate": "2020-01-21T16:00:27.000+0700", + "expiryDate": "2020-01-30T18:42:42.000+0700", + "status": "Inactive" + }, + { + "assetRowID": "1-7P3ONX4", + "parAssetRowID": "1-6XIP5UU", + "rootAssetRowID": "1-6XIP5UU", + "assetNo": "COC1392733161593291439753", + "partNum": "CO_16159329", + "offerCode": "NOAHTS08", + "offerName": "NOAHTS08-TrueID TV box Service fee 50 Baht recurring-TrueID TV Box Service fee", + "productRowID": "1-1UQ9-103", + "productCategory": "External", + "productName": "16159329-NOAHTS08", + "productType": "SOC/OFFER", + "productLine": "True Mobile", + "effectiveDate": "2020-01-17T15:52:53.000+0700", + "expiryDate": "2020-01-21T15:48:30.000+0700", + "status": "Inactive" + }, + { + "assetRowID": "1-7P3ONX8", + "parAssetRowID": "1-6XIP5UU", + "rootAssetRowID": "1-6XIP5UU", + "assetNo": "COC1392733161593291438729", + "partNum": "CO_16159329", + "offerCode": "NOAHTS08", + "offerName": "NOAHTS08-TrueID TV box Service fee 50 Baht recurring-TrueID TV Box Service fee", + "productRowID": "1-1UQ9-103", + "productCategory": "External", + "productName": "16159329-NOAHTS08", + "productType": "SOC/OFFER", + "productLine": "True Mobile", + "effectiveDate": "2020-01-16T12:09:26.000+0700", + "expiryDate": "2020-01-17T15:48:49.000+0700", + "status": "Inactive" + }, + { + "assetRowID": "1-75N9HNR", + "parAssetRowID": "1-6XIP5UU", + "rootAssetRowID": "1-6XIP5UU", + "assetNo": "COC1392733161009291438589", + "partNum": "CO_16100929", + "offerCode": "RMVC00000001901", + "offerName": "RMVC00000001901-SH_Smart Employee_iPhone 7 32GB lock sim_Disc10510_NoAdv_c12", + "productRowID": "1-1U2D-31", + "productCategory": "External", + "productName": "16100929-RMVC00000001901", + "productType": "SOC/OFFER", + "productLine": "True Mobile", + "effectiveDate": "2020-01-16T11:05:13.000+0700", + "expiryDate": "2020-02-05T17:33:23.000+0700", + "status": "Inactive" + }, + { + "assetRowID": "1-75N9HNJ", + "parAssetRowID": "1-6XIP5UU", + "rootAssetRowID": "1-6XIP5UU", + "assetNo": "KNOX1392733201195782", + "serialNo": "359440080055649", + "productCode": "Product", + "partNum": "KNOX", + "offerName": "KNOX IMEI", + "productRowID": "1-75L97ZY", + "productCategory": "External", + "productName": "KNOX IMEI", + "productLine": "True Mobile", + "effectiveDate": "2020-01-15T15:31:53.000+0700", + "expiryDate": "2020-02-05T17:33:23.000+0700", + "status": "Inactive", + "installDate": "2020-01-15T07:00:00.000+0700" + }, + { + "assetRowID": "1-7P3ONXC", + "parAssetRowID": "1-6XIP5UU", + "rootAssetRowID": "1-6XIP5UU", + "assetNo": "COC1392733161593291437581", + "partNum": "CO_16159329", + "offerCode": "NOAHTS08", + "offerName": "NOAHTS08-TrueID TV box Service fee 50 Baht recurring-TrueID TV Box Service fee", + "productRowID": "1-1UQ9-103", + "productCategory": "External", + "productName": "16159329-NOAHTS08", + "productType": "SOC/OFFER", + "productLine": "True Mobile", + "effectiveDate": "2020-01-15T14:45:14.000+0700", + "expiryDate": "2020-01-16T12:01:08.000+0700", + "status": "Inactive" + }, + { + "assetRowID": "1-75N9HNV", + "parAssetRowID": "1-6XIP5UU", + "rootAssetRowID": "1-6XIP5UU", + "assetNo": "COC1392733199911436448", + "partNum": "CO_19991", + "offerCode": "1331SS01", + "offerName": "1331SS01-Free for 1331, 1242 and 1239-Free for 1331, 1242 and 1239", + "productRowID": "1-1TH-1678", + "productCategory": "External", + "productName": "19991-1331SS01", + "productType": "SOC/OFFER", + "productLine": "True Mobile", + "effectiveDate": "2020-01-13T15:53:40.000+0700", + "status": "Active" + }, + { + "assetRowID": "1-6XL4A3B", + "parAssetRowID": "1-6XIP5UU", + "rootAssetRowID": "1-6XIP5UU", + "assetNo": "COC1392733140264271436086", + "partNum": "CO_14026427", + "offerCode": "RMV000000007991", + "offerName": "RMV000000007991-SH_Galaxy KNOX_Disc3500_c12", + "productRowID": "1-1N9O-200", + "productCategory": "External", + "productName": "14026427-RMV000000007991", + "productType": "SOC/OFFER", + "productLine": "True Mobile", + "effectiveDate": "2020-01-09T18:19:28.000+0700", + "expiryDate": "2020-02-05T17:33:23.000+0700", + "status": "Inactive" + }, + { + "assetRowID": "1-6XL4A3F", + "parAssetRowID": "1-6XIP5UU", + "rootAssetRowID": "1-6XIP5UU", + "assetNo": "COC1392733140269271436085", + "partNum": "CO_14026927", + "offerCode": "RMV000000007996", + "offerName": "RMV000000007996-NS_Galaxy KNOX_Disc4500_c12", + "productRowID": "1-1J42-34", + "productCategory": "External", + "productName": "14026927-RMV000000007996", + "productType": "SOC/OFFER", + "productLine": "True Mobile", + "effectiveDate": "2020-01-09T18:06:26.000+0700", + "expiryDate": "2020-01-09T18:14:15.000+0700", + "status": "Inactive" + }, + { + "assetRowID": "1-6XIP5WN", + "parAssetRowID": "1-6XIP5UU", + "rootAssetRowID": "1-6XIP5UU", + "assetNo": "COC1392733162101291436038", + "partNum": "CO_16210129", + "offerCode": "CUGFRS15", + "offerName": "CUGFRS15-Close User Group (Free) - True Family Plus-CUG (Free) - True Family Plus", + "productRowID": "1-1UPG-27", + "productCategory": "External", + "productName": "16210129-CUGFRS15", + "productType": "SOC/OFFER", + "productLine": "True Mobile", + "effectiveDate": "2020-01-09T12:20:56.000+0700", + "status": "Active", + "offerType": "CUG" + }, + { + "assetRowID": "1-6XIP5WJ", + "parAssetRowID": "1-6XIP5UU", + "rootAssetRowID": "1-6XIP5UU", + "assetNo": "COC1392733161593291436037", + "partNum": "CO_16159329", + "offerCode": "NOAHTS08", + "offerName": "NOAHTS08-TrueID TV box Service fee 50 Baht recurring-TrueID TV Box Service fee", + "productRowID": "1-1UQ9-103", + "productCategory": "External", + "productName": "16159329-NOAHTS08", + "productType": "SOC/OFFER", + "productLine": "True Mobile", + "effectiveDate": "2020-01-09T11:57:22.000+0700", + "expiryDate": "2020-01-10T11:28:35.000+0700", + "status": "Inactive" + }, + { + "assetRowID": "1-6XIP5VZ", + "parAssetRowID": "1-6XIP5UU", + "rootAssetRowID": "1-6XIP5UU", + "assetNo": "trueIDTV1392733201192647", + "serialNo": "trueIDTV-108628999", + "productCode": "Product", + "partNum": "trueIDTV", + "offerName": "True ID TV", + "productRowID": "1-3W58I9A", + "productCategory": "External", + "productName": "True ID TV", + "productType": "TVG", + "productLine": "True Mobile", + "effectiveDate": "2020-01-09T11:57:22.000+0700", + "status": "Active", + "installDate": "2020-01-09T07:00:00.000+0700" + }, + { + "assetRowID": "1-6XIP5WV", + "parAssetRowID": "1-6XIP5UU", + "rootAssetRowID": "1-6XIP5UU", + "assetNo": "COC1392733312621434698", + "partNum": "CO_31262", + "offerCode": "BALANCELIMIT", + "offerName": "BALANCELIMIT-Spending limit offer", + "productRowID": "1-1TH-1838", + "productCategory": "External", + "productName": "31262-BALANCELIMIT", + "productType": "SOC/OFFER", + "productLine": "True Mobile", + "effectiveDate": "2020-01-07T17:41:47.000+0700", + "status": "Active", + "offerType": "BALANCELIMIT" + }, + { + "assetRowID": "1-6XIP5WB", + "parAssetRowID": "1-6XIP5UU", + "rootAssetRowID": "1-6XIP5UU", + "assetNo": "COC1392733131024251425627", + "partNum": "CO_13102425", + "offerCode": "ITMBLS02", + "offerName": "ITMBLS02-Itemized e-Bill Service-Itemized e-Bill Service", + "productRowID": "1-1EKZ-20", + "productCategory": "External", + "productName": "13102425-ITMBLS02", + "productType": "SOC/OFFER", + "productLine": "True Mobile", + "effectiveDate": "2019-12-23T18:22:24.000+0700", + "status": "Active" + }, + { + "assetRowID": "1-6XIP5WF", + "parAssetRowID": "1-6XIP5UU", + "rootAssetRowID": "1-6XIP5UU", + "assetNo": "COC1392733155109271425625", + "partNum": "CO_15510927", + "offerCode": "PROFCVBAR", + "offerName": "PROFCVBAR-First Call Verification, Barring - Additional-First Call Verification, Barring", + "productRowID": "1-1KFG-151", + "productCategory": "External", + "productName": "15510927-PROFCVBAR", + "productType": "SOC/OFFER", + "productLine": "True Mobile", + "effectiveDate": "2019-12-23T18:22:16.000+0700", + "status": "Active" + }, + { + "assetRowID": "1-6XIP5W3", + "parAssetRowID": "1-6XIP5UU", + "rootAssetRowID": "1-6XIP5UU", + "assetNo": "CPC13927332630381425619", + "partNum": "CP_263038", + "offerCode": "BUSTBP11", + "offerName": "BUSTBP11-Biz ThuukJai RC 599 Get 1,100 min-Biz ThuukJai RC 599", + "productRowID": "1-4WK-5763", + "productCategory": "External", + "productName": "263038-BUSTBP11", + "productType": "Price Plan", + "productLine": "True Mobile", + "effectiveDate": "2019-12-23T18:10:57.000+0700", + "expiryDate": "2020-02-06T00:00:00.000+0700", + "status": "Inactive", + "offerType": "Price Plan" + }, + { + "assetRowID": "1-6XIP5VN", + "parAssetRowID": "1-6XIP5UU", + "rootAssetRowID": "1-6XIP5UU", + "assetNo": "CSC1392733201186614", + "serialNo": "896600401500004362", + "partNum": "Mobile SIM Card", + "offerName": "Mobile SIM Card", + "productRowID": "1-1U5-1570", + "productCategory": "External", + "productName": "Mobile SIM Card", + "productType": "SIM Card", + "productLine": "True Mobile", + "effectiveDate": "2019-12-23T18:10:57.000+0700", + "status": "Active", + "installDate": "2019-12-23T07:00:00.000+0700" + }, + { + "assetRowID": "1-6XIP5VR", + "parAssetRowID": "1-6XIP5UU", + "rootAssetRowID": "1-6XIP5UU", + "assetNo": "CIC1392733201186615", + "serialNo": "520002000004362", + "partNum": "Mobile IMSI", + "offerName": "Mobile IMSI", + "productRowID": "1-1U5-1954", + "productCategory": "External", + "productName": "Mobile IMSI", + "productType": "IMSI", + "productLine": "True Mobile", + "effectiveDate": "2019-12-23T18:10:57.000+0700", + "status": "Active", + "installDate": "2019-12-23T07:00:00.000+0700" + }, + { + "assetRowID": "1-6XIP5XB", + "parAssetRowID": "1-6XIP5UU", + "rootAssetRowID": "1-6XIP5UU", + "assetNo": "COC1392733793331425623", + "partNum": "CO_79333", + "offerCode": "RMGPSS51", + "offerName": "RMGPSS51-GPRS SpecialRate(PP)0.002 bt/KB,Cap1500-GPRS SpRate-PP 0.002 bt/KB,Cap1500", + "productRowID": "1-1TH-2516", + "productCategory": "External", + "productName": "79333-RMGPSS51", + "productType": "SOC/OFFER", + "productLine": "True Mobile", + "effectiveDate": "2019-12-23T18:10:57.000+0700", + "status": "Active" + }, + { + "assetRowID": "1-6XIP5X7", + "parAssetRowID": "1-6XIP5UU", + "rootAssetRowID": "1-6XIP5UU", + "assetNo": "COC1392733417011425622", + "partNum": "CO_41701", + "offerCode": "RMPGPS01", + "offerName": "RMPGPS01-GPRS Provisioning SOC - RMV (HMMS,HINTERNET)-GPRS Provisioning - HMMS,HINTERNET", + "productRowID": "1-1TH-1872", + "productCategory": "External", + "productName": "41701-RMPGPS01", + "productType": "SOC/OFFER", + "productLine": "True Mobile", + "effectiveDate": "2019-12-23T18:10:57.000+0700", + "expiryDate": "2020-01-13T15:58:33.000+0700", + "status": "Inactive" + }, + { + "assetRowID": "1-6XIP5X3", + "parAssetRowID": "1-6XIP5UU", + "rootAssetRowID": "1-6XIP5UU", + "assetNo": "COC1392733416411425621", + "partNum": "CO_41641", + "offerCode": "RMHSPS02", + "offerName": "RMHSPS02-Hi-Speed 3G/EDGE/GPRS 21.5 Mbps - PostPay (rev 42)-3G/EDGE/GPRS 21.5Mbps(rev to42Mbps)", + "productRowID": "1-1TH-1869", + "productCategory": "External", + "productName": "41641-RMHSPS02", + "productType": "SOC/OFFER", + "productLine": "True Mobile", + "effectiveDate": "2019-12-23T18:10:57.000+0700", + "status": "Active" + }, + { + "assetRowID": "1-6XIP5WZ", + "parAssetRowID": "1-6XIP5UU", + "rootAssetRowID": "1-6XIP5UU", + "assetNo": "COC1392733409411425620", + "partNum": "CO_40941", + "offerCode": "PROSTDA1", + "offerName": "PROSTDA1-Standard Provisioning Services for Post Pay # 1-Standard Provisioning for Post Pay", + "productRowID": "1-1TH-1860", + "productCategory": "External", + "productName": "40941-PROSTDA1", + "productType": "SOC/OFFER", + "productLine": "True Mobile", + "effectiveDate": "2019-12-23T18:10:57.000+0700", + "status": "Active" + }, + { + "assetRowID": "1-6XIP5WR", + "parAssetRowID": "1-6XIP5UU", + "rootAssetRowID": "1-6XIP5UU", + "assetNo": "COC1392733200611425624", + "partNum": "CO_20061", + "offerCode": "CREDITLIMIT", + "offerName": "CREDITLIMIT-Credit Limit offer", + "productRowID": "1-1TH-1682", + "productCategory": "External", + "productName": "20061-CREDITLIMIT", + "productType": "SOC/OFFER", + "productLine": "True Mobile", + "effectiveDate": "2019-12-23T18:10:57.000+0700", + "status": "Active" + }, + { + "assetRowID": "1-6XIP5VV", + "parAssetRowID": "1-6XIP5UU", + "rootAssetRowID": "1-6XIP5UU", + "assetNo": "CMC1392733201186616", + "serialNo": "MSISDN-0968730341", + "productCode": "Product", + "partNum": "MSISDN", + "offerName": "MSISDN", + "productRowID": "1-1UK76M", + "productCategory": "External", + "productName": "MSISDN", + "productType": "MSISDN", + "productLine": "True Mobile", + "effectiveDate": "2019-12-23T18:10:57.000+0700", + "status": "Active", + "installDate": "2019-12-23T07:00:00.000+0700" + }, + { + "assetRowID": "1-6XIP5W7", + "parAssetRowID": "1-6XIP5UU", + "rootAssetRowID": "1-6XIP5UU", + "assetNo": "COC1392733114044121425618", + "partNum": "CO_11404412", + "offerCode": "RMV000000001641", + "offerName": "RMV000000001641-Change ownership", + "productRowID": "1-E87-1413", + "productCategory": "External", + "productName": "11404412-RMV000000001641", + "productType": "SOC/OFFER", + "productLine": "True Mobile", + "effectiveDate": "2019-12-23T18:10:57.000+0700", + "status": "Active" + } + ] +} + + res.status(200).send(response) +} \ No newline at end of file diff --git a/int.js b/int.js new file mode 100644 index 0000000..8effba4 --- /dev/null +++ b/int.js @@ -0,0 +1,540 @@ +module.exports.getAllDiscountList = async (req, res) => { + console.log('===== POST getAllDiscountList =====') + console.log('url', req.originalUrl); + console.log('headers', req.headers); + console.log('query', req.query); + console.log('params', req.params); + console.log('body', req.body); + + let responseErr = { + "getAllDiscountListResponse": { + "return": { + "uuid": "ed41f948-565c-4900-a94d-ee63100e2fa4", + "errorCode": "OSBbllngA10001", + "message": "error." + } + } + } + + let response = { + "getAllDiscountListResponse": { + "return": { + "uuid": "ed41f948-565c-4900-a94d-ee63100e2fa4", + "errorCode": "OSBbllngA00001", + "message": "Success.", + "totalSize": 1, + "calculatedPageSize": 50, + "agreementBasicOfferList": { + "size": 1, + "agreementBasicOfferInfo": [ + { + "serviceAgreement": { + "agreementSocSequence": "1516667", + "agreementId": "1516667", + "expirationIssueDate": null, + "parentSocSequence": null, + "effectiveDate": "2021-06-08T10:11:51.000+07:00", + "effectiveIssueDate": "2021-06-08T10:11:51.000+07:00", + "socSequence": "1814357", + "expirationDate": null, + "status": "C" + }, + "offerInfo": { + "socType": "D", + "code": "BSP014", + "name": "CVG012", + "description": "True Smart Choice Discount 499", + "serviceLevel": { + "code": "C", + "description": "Subscriber" + } + } + } + ] + } + } + } + } + + res.status(200).send(response) +} + +module.exports.getFuturePromotionList = async (req, res) => { + console.log('===== POST getFuturePromotionList =====') + console.log('url', req.originalUrl); + console.log('headers', req.headers); + console.log('query', req.query); + console.log('params', req.params); + console.log('body', req.body); + + let responseErr = { + "getFuturePromotionListResponse": { + "return": { + "uuid": "ed41f948-565c-4900-a94d-ee63100e2fa4", + "errorCode": "OSBbllngA10001", + "message": "error." + } + } + } + + let response = { + "getFuturePromotionListResponse": { + "return": { + "uuid": "df9f1de2-9d11-43e5-b836-7b589fb8e084", + "errorCode": "OSBbllngA00001", + "message": "Success.", + "futureOfferList": { + "size": 4, + "futureOfferArray": [ + { + "offer": { + "socType": "D", + "iddIndicator": "N", + "code": "14284917", + "rcRate": "0.0", + "irIndicator": "N", + "name": "VGSHFYYD228", + "description": "Disc. Subscription Fee for 6 Months Sub.", + "ffIndicator": "N", + "serviceLevel": { + "code": "C", + "description": "Subscriber" + }, + "cugIndicator": "N" + }, + "future": { + "orderType": null, + "activityReason": "CREQ", + "futureSource": "ADDSERVICES", + "futureSocParentId": null, + "futureId": null, + "futureType": "REQUEST", + "remark": null, + "futureSocId": "927420", + "createDate": "2018-02-27T23:59:59.000+07:00", + "status": { + "code": "B", + "description": "PROCESSING" + } + }, + "serviceAgreement": { + "agreementSocSequence": null, + "agreementId": "1062554", + "expirationIssueDate": null, + "parentSocSequence": null, + "effectiveDate": "2018-02-28T00:00:00.000+07:00", + "effectiveIssueDate": "2018-02-27T23:59:59.000+07:00", + "socSequence": "927420", + "expirationDate": null, + "status": "F" + } + }, + { + "offer": { + "socType": "U", + "iddIndicator": "N", + "code": "14053717", + "rcRate": "145.0", + "irIndicator": "N", + "name": "VGRET06S085", + "description": "#1 IRD/STD Happy Family HD", + "ffIndicator": "N", + "serviceLevel": { + "code": "C", + "description": "Subscriber" + }, + "cugIndicator": "N" + }, + "future": { + "orderType": null, + "activityReason": "CREQ", + "futureSource": "ADDSERVICES", + "futureSocParentId": null, + "futureId": null, + "futureType": "REQUEST", + "remark": null, + "futureSocId": "927421", + "createDate": "2018-02-27T23:59:59.000+07:00", + "status": { + "code": "B", + "description": "PROCESSING" + } + }, + "serviceAgreement": { + "agreementSocSequence": null, + "agreementId": "1062554", + "expirationIssueDate": null, + "parentSocSequence": null, + "effectiveDate": "2018-02-28T00:00:00.000+07:00", + "effectiveIssueDate": "2018-02-27T23:59:59.000+07:00", + "socSequence": "927421", + "expirationDate": null, + "status": "F" + } + }, + { + "offer": { + "socType": "D", + "iddIndicator": "N", + "code": "14297617", + "rcRate": "0.0", + "irIndicator": "N", + "name": "VGSHFYYD355", + "description": "Disc.Decoder Service Fee -6 Months Sub", + "ffIndicator": "N", + "serviceLevel": { + "code": "C", + "description": "Subscriber" + }, + "cugIndicator": "N" + }, + "future": { + "orderType": null, + "activityReason": "CREQ", + "futureSource": "ADDSERVICES", + "futureSocParentId": null, + "futureId": null, + "futureType": "FUTPP", + "remark": null, + "futureSocId": "927422", + "createDate": "2018-02-27T23:59:59.000+07:00", + "status": { + "code": "B", + "description": "PROCESSING" + } + }, + "serviceAgreement": { + "agreementSocSequence": null, + "agreementId": "1062554", + "expirationIssueDate": null, + "parentSocSequence": null, + "effectiveDate": "2018-02-28T00:00:00.000+07:00", + "effectiveIssueDate": "2018-02-27T23:59:59.000+07:00", + "socSequence": "927422", + "expirationDate": null, + "status": "F" + } + }, + { + "offer": { + "socType": "U", + "iddIndicator": "N", + "code": "11209513", + "rcRate": "145.0", + "irIndicator": "N", + "name": "VGRET01S001", + "description": "#1 IRD/STD", + "ffIndicator": "N", + "serviceLevel": { + "code": "C", + "description": "Subscriber" + }, + "cugIndicator": "N" + }, + "future": { + "orderType": null, + "activityReason": "CREQ", + "futureSource": "REQUEST", + "futureSocParentId": null, + "futureId": null, + "futureType": "UPDATESERVICES", + "remark": null, + "futureSocId": "265649", + "createDate": "2018-02-27T23:59:59.000+07:00", + "status": { + "code": "B", + "description": "PROCESSING" + } + }, + "serviceAgreement": { + "agreementSocSequence": null, + "agreementId": "1062554", + "expirationIssueDate": null, + "parentSocSequence": null, + "effectiveDate": "2016-01-19T23:59:59.000+07:00", + "effectiveIssueDate": "2018-02-27T23:59:59.000+07:00", + "socSequence": "265649", + "expirationDate": "2018-02-28T00:00:00.000+07:00", + "status": "F" + } + } + ] + } + } + } + } + + res.status(200).send(response) +} + +module.exports.getCurrentCUGList = async (req, res) => { + console.log('===== POST getCurrentCUGList =====') + console.log('url', req.originalUrl); + console.log('headers', req.headers); + console.log('query', req.query); + console.log('params', req.params); + console.log('body', req.body); + + let responseErr = { + "errorCode": "INT10001", + "message": "error." + } + + let response = { + "uuid": "efa38396-ea5a-4b55-8a07-bed5cb998d4a", + "errorCode": "INT00001", + "message": "Success.", + "cugOfferList": { + "cugOfferArray": [ + { + "cug": { + "groupDescription": "HR 001", + "groupId": "623", + "groupIdentifier": "Test", + "groupName": "HR 001", + "groupType": "GAS" + }, + "offerInfo": { + "code": "55092", + "description": "CUG On/Off Net (Package level)", + "name": "CCUGAS01", + "serviceLevel": { + "code": "C", + "description": "Subscriber" + }, + "socType": "U" + }, + "serviceAgreement": { + "agreementSocSequence": "58796", + "agreementId": "1052", + "expirationIssueDate": null, + "parentSocSequence": "58796", + "effectiveDate": "2013-05-12T16:46:04.000+07:00", + "effectiveIssueDate": "2013-05-12T16:46:04.000+07:00", + "socSequence": "58796", + "expirationDate": null, + "status": "A" + } + } + ], + "size": 1 + } + } + + res.status(200).send(response) +} + +module.exports.getCurrentFriendFamilyList = async (req, res) => { + console.log('===== POST getCurrentFriendFamilyList =====') + console.log('url', req.originalUrl); + console.log('headers', req.headers); + console.log('query', req.query); + console.log('params', req.params); + console.log('body', req.body); + + let responseErr = { + "errorCode": "INT10001", + "message": "error." + } + + let response = { + "uuid": "431db28c-851c-4185-9256-18d4f012d563", + "errorCode": "INT00001", + "message": "Success.", + "ffOfferList": { + "ffOfferArray": [ + { + "ffNumberArray": "0937965195;0870300146", + "ffNumberEffectiveDate": "2013-11-05T11:09:45.000+07:00", + "offerInfo": { + "code": "10197910", + "description": "Free call and Free SMS for same Family(F&F)", + "name": "FFVSMS01", + "serviceLevel": { + "code": "C", + "description": "Subscriber" + }, + "socType": "U" + }, + "serviceAgreement": { + "agreementSocSequence": 158407, + "agreementId": 4665, + "expirationIssueDate": null, + "parentSocSequence": null, + "effectiveDate": "2013-11-05T11:06:27.000+07:00", + "effectiveIssueDate": "2013-11-05T11:06:27.000+07:00", + "socSequence": 158407, + "expirationDate": null, + "status": "A" + } + } + ], + "size": 1 + } + } + + res.status(200).send(response) +} + +module.exports.getCurrentSpendingLimitList = async (req, res) => { + console.log('===== POST getCurrentSpendingLimitList =====') + console.log('url', req.originalUrl); + console.log('headers', req.headers); + console.log('query', req.query); + console.log('params', req.params); + console.log('body', req.body); + + let responseErr = { + "errorCode": "INT10001", + "message": "error." + } + + let response = { + "uuid": "e1aa3505-c7d4-4e2f-83b7-a4d0dacdcf2d", + "errorCode": "INT00001", + "message": "Success.", + "spendingLimitList": { + "size": 1, + "spendingLimitArray": [ + { + "offerInfo": { + "code": "31262", + "description": "Spending limit offer", + "name": "BALANCELIMIT", + "serviceLevel": { + "code": "C", + "description": "Subscriber" + }, + "socType": "U" + }, + "serviceAgreement": { + "agreementSocSequence": 10064, + "agreementId": 1052, + "expirationIssueDate": null, + "parentSocSequence": null, + "effectiveDate": "2013-03-02T10:53:45.000+07:00", + "effectiveIssueDate": "2013-03-02T10:53:45.000+07:00", + "socSequence": 10064, + "expirationDate": null, + "status": "A" + }, + "spendingLimitInfo": { + "firstTriggerPercentage": 0, + "incrementTriggerPercentage": 0, + "thresholdAmount": 0 + } + } + ] + } + } + + res.status(200).send(response) +} + +module.exports.getCurrentCreditLimitAtSubList = async (req, res) => { + console.log('===== POST getCurrentCreditLimitAtSubList =====') + console.log('url', req.originalUrl); + console.log('headers', req.headers); + console.log('query', req.query); + console.log('params', req.params); + console.log('body', req.body); + + let responseErr = { + "errorCode": "INT10001", + "message": "error.", + } + + let response = { + "uuid": "09dc5cf6-6cfb-4732-baed-b29dba320069", + "errorCode": "INT00001", + "message": "Success.", + "creditLimitAtSubList": { + "creditLimitAtSubArray": [ + { + "creditLimitAtSubInfo": { + "firstTriggerPercent": 0, + "incrementTriggerPercent": 0, + "permanentThreshold": 5000, + "temporaryThreshold": 4454 + }, + "offerInfo": { + "code": "212158", + "description": "Credit_Limit_at_Sub for Enterprise", + "name": "Credit_Limit_at_Sub", + "serviceLevel": { + "code": "C", + "description": "Subscriber" + }, + "socType": "U" + }, + "serviceAgreement": { + "agreementSocSequence": null, + "agreementId": 1025625, + "expirationIssueDate": null, + "parentSocSequence": null, + "effectiveDate": "2014-02-23T23:59:59.000+07:00", + "effectiveIssueDate": "2014-02-23T23:59:59.000+07:00", + "socSequence": 152147, + "expirationDate": null, + "status": "A" + } + } + ], + "size": 1 + } + } + + res.status(200).send(response) +} + +module.exports.getCurrentSplitChargeInfo = async (req, res) => { + console.log('===== POST getCurrentSplitChargeInfo =====') + console.log('url', req.originalUrl); + console.log('headers', req.headers); + console.log('query', req.query); + console.log('params', req.params); + console.log('body', req.body); + + let responseErr = { + "errorCode": "INT10001", + "message": "error.", + } + + let response = { + "uuid": "a4a2ff41-cfd4-407a-9729-f6636ccc0e24", + "errorCode": "INT00001", + "message": "Success.", + "splitChargeParameterInfo": { + "basicOfferInfo": { + "code": "493178", + "description": "SPLITS01", + "name": "Split Charge Offer", + "serviceLevel": { + "code": "C", + "description": "Subscriber" + }, + "socType": "U" + }, + "serviceAgreementInfo": { + "agreementSocSequence": 1147381, + "agreementId": 1078490, + "expirationIssueDate": null, + "parentSocSequence": null, + "effectiveDate": "2018-12-06T14:48:16.000+07:00", + "effectiveIssueDate": "2018-12-06T14:48:16.000+07:00", + "socSequence": 1147381, + "expirationDate": null, + "status": "A" + }, + "splitChargeParameterInfo": { + "splitCode": "UTC_URU015", + "splitDescription": "UTC 2500", + "splitPeriod": "NONE", + "targetAccountNo": 11029510, + "targetPCN": 11029510 + } + } + } + + res.status(200).send(response) +} \ No newline at end of file -- libgit2 0.21.2