From 5fdd6d1b0782d4993470066a5692959cf7b1a4ea Mon Sep 17 00:00:00 2001 From: Nattapon W Date: Mon, 5 Jul 2021 10:03:08 +0700 Subject: [PATCH] update mockup for ture --- app.js | 1 + ccbs.js | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 98 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index 6aeca1a..9323fbd 100644 --- a/app.js +++ b/app.js @@ -397,6 +397,7 @@ app.post('/api/v1/LG-API/notifySubscription', require('./lg').notifySubscription app.post('/goapi/profile/assetDetail', require('./ccbs').assetDetail); app.post('/goapi/profile/churnscore/offerlist', require('./ccbs').churnScoreOfferList); app.get('/goapi/profile/external/customer/usageInfo/:type/:number', require('./ccbs').usageInfo); +app.post('/v1/OSBCOM/BillingProfileInfo/UsageProfileInfoREST/getAccumulationUOMGroupList/', require('./ccbs').accumulationUOMGroupList); app.get('/api/callback', require('./line').callback); diff --git a/ccbs.js b/ccbs.js index c6ce62e..a7f9acf 100644 --- a/ccbs.js +++ b/ccbs.js @@ -149,7 +149,103 @@ module.exports.usageInfo = async (req, res) => { "TrueMoneyError": true } - res.status(200).send(responseErr) + res.status(200).send(response) +} + +module.exports.accumulationUOMGroupList = async (req, res) => { + console.log('===== POST accumulationUOMGroupList =====') + 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); + + console.log(JSON.stringify(req.body)) + + let responseErr = { + "errorCode" : "OSBbllngA00002", + "message" : "Error.", + } + + let response = { + "errorCode" : "OSBbllngA00001", + "message" : "Success.", + "uuid" : "ca517eac-b687-45f2-a921-c5138c44402e", + "backendResponseList" : { + "backendResponseInfoArray" : [ { + "apiName" : "getPrimaryKeyInfoByActiveAndBusinessLine", + "errorCode" : "OSBbllngA00001", + "message" : "Success.", + "system" : "OSB", + "url" : "http://172.19.188.21:8080/ESB_Get_CustomerPreferenceInfo/Interfaces/Proxy/CommonPreferenceInfoPS" + }, { + "apiName" : "getUnbilledCycleInfo", + "errorCode" : "OSBbllngA00001", + "message" : "Success.", + "system" : "OSB", + "url" : "http://172.19.188.21:8080/ESB_Get_FinancialManagementInfo/Interfaces/Proxy/BillingInfoPS" + }, { + "apiName" : "getRatedPerformanceIndicators3", + "errorCode" : "OSBbllngA00001", + "message" : "Success.", + "system" : "CCCSOA", + "url" : "http://172.19.136.104/RaterServiceWS/RaterServiceSI" + } ] + }, + "accumulationUOMGroupList" : { + "accumulationInfoArray" : [ { + "accumulatedCharge" : 135, + "accumulatedQuantity" : 191, + "accumulatedQuantityFormat" : "03:11:00", + "lastCallDate" : "2021-03-21T22:44:19.000+07:00", + "serviceType" : "Voice", + "system" : "CCBS", + "uomCode" : "M" + }, { + "accumulatedCharge" : 1013.5, + "accumulatedQuantity" : 223, + "accumulatedQuantityFormat" : null, + "lastCallDate" : "2021-03-22T08:06:29.000+07:00", + "serviceType" : "SMS", + "system" : "CCBS", + "uomCode" : "O" + }, { + "accumulatedCharge" : 546.4, + "accumulatedQuantity" : 223, + "accumulatedQuantityFormat" : null, + "lastCallDate" : "2021-03-22T08:06:29.000+07:00", + "serviceType" : "Video", + "system" : "CCBS", + "uomCode" : "O" + }, { + "accumulatedCharge" : 785.8, + "accumulatedQuantity" : 223, + "accumulatedQuantityFormat" : null, + "lastCallDate" : "2021-03-22T08:06:29.000+07:00", + "serviceType" : "Voice", + "system" : "CCBS", + "uomCode" : "O" + }, { + "accumulatedCharge" : 1251.9, + "accumulatedQuantity" : 258, + "accumulatedQuantityFormat" : null, + "lastCallDate" : "2021-03-22T08:06:29.000+07:00", + "serviceType" : "Video", + "system" : "CCBS", + "uomCode" : "M" + } ], + "size" : 2 + }, + "cycleInfo" : { + "code" : 13, + "month" : 4, + "year" : 2021 + }, + "maxLastCallDate" : "2021-03-22T08:06:29.000+07:00", + "rerateIndicator" : "N" + } + + res.status(200).send(response) } -- libgit2 0.21.2