module.exports.assetDetail = async (req, res) => { console.log('===== POST assetDetail =====') 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.", "outstandingBalance": 1, "currentBillBalance": 1.61, "dueDate": "21/11/2020", "subStatus": { "FullSusMsg": "No", "status": "Active", "detail": [{ "reason": "(SYSREQ)System Request", "since": "05/10/2018 17:54:36" } ] }, "assetRowId": "1-2CN6IWH0", "serviceId": "0952543411", "productLine": "True Mobile", "startDate": "16/07/2015", "assetLifetime": "5 years, 4 months, 9 days", "preferredLanguage": "Thai", "productType": "Postpay", "currentBillCycle": "28/27", "lastPPEffectiveDate": "28/10/2019", "lastFullSuspension": "No", "credit": { "limit": 2500, "available": 2459.5, "defaultCredit": "1000", "temporary": "0", "permanent": "2500", "expiryDate": "", "status": "Permanent", "totalObligation": 40.5 }, "discount": { "discountList": [{ "name": "CVG012", "description": "True Smart Choice Discount 499", "startDate": "05/10/2018", "endDate": "06/10/2018" } ], "discountIndicator": "Yes" }, "contract": { "contractIndicator": "No", "list": [{ "propositionCode": "CVG000000000052", "propositionDescription": "TrueSmartChoice Regu 4G No Limit", "term": "12", "fee": 123, "startDate": "04/10/2019", "expireDate": "10/08/2021", "contractIndicator": "No", "offerCode": "12534317", "contractNumber": "-", "offerInstanceId": "162918628", "terminationDate": "" }, { "propositionCode": "CVG000000000052", "propositionDescription": "TrueSmartChoice Regu 4G No Limit", "term": "12", "fee": "xxxx", "startDate": "04/10/2019", "expireDate": "05/07/2022", "contractIndicator": "No", "offerCode": "12534317", "contractNumber": "-", "offerInstanceId": "162918628", "terminationDate": "" } ] }, "installAddress": {} } res.status(200).send(response) } module.exports.churnScoreOfferList = async (req, res) => { console.log('===== POST churnScoreOfferList =====') 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": "404", "msg": "Not found" } let response = { "code": "0", "msg": "Success", "campTransID": "5c0a746b-ae69-447d-84b0-b0bdaa4b6add", "campID": "0007", "campCode": "PRPTOL000001", "campName": "PRP TOL CAMPAIGN", "callScript": "", "offerList": [ { "productName": "True Online", "offerCode": "VASUP121MOCJA01", "offerName": "1000/500Mbps.", "offerType": "VAS", "offerTypeText": "VAS", "offerDescTH": "VASUP121MOCJA01 : 1000/500Mbps.", "offerDescEN": "VASUP121MOCJA01 : 1000/500Mbps.", "serviceType": "85", "autoAssign": "N", "appointmentFlag": true } ] } res.status(200).send(response) } module.exports.usageInfo = async (req, res) => { console.log('===== GET usageInfo =====') 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": "404", "msg": "Not found" } let response = { "code": "0", "msg": "Success", "trueId": { "device": "WEB", "lastAccess": "27/12/2018 04:51:12" }, "trueYou": { "device": "WEB", "lastAccess": "27/12/2018 04:25:42" }, "iService": { "device": "IOS", "lastAccess": "27/12/2018 04:31:22" }, "trueWallet": { "device": "123", "lastAccess": "" }, "trueTv": { "device": "", "lastAccess": "27/11/2018 04:31:22" }, "trueVisions": { "device": "", "lastAccess": "" }, "tdgError": false, "TrueMoneyError": true } 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(responseErr) } module.exports.getPrimaryKeyListWithoutResourceType = async (req, res) => { console.log('===== POST getPrimaryKeyListWithoutResourceType =====') 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 = { "getPrimaryKeyListWithoutResourceTypeResponse": { "return": { "uuid": "f9336125-be9e-4c37-80c4-ab97990100cf", "errorCode": "OSBbllngA10001", "message": "Error" } } } let response = { "getPrimaryKeyListWithoutResourceTypeResponse": { "return": { "uuid": "f9336125-be9e-4c37-80c4-ab97990100cf", "errorCode": "OSBbllngA00001", "message": "Success.", "primaryKeyList": { "primaryKeyInfoArray": [ { "accountId": "200093866", "accountSubType": "RVT", "agreementIdOfOU": "1392732", "agreementIdOfRootOU": "", "customerId": "213656", "customerType": "I", "ouId": "133066", "primaryResourceType": "C", "primaryResourceValue": "0968730341", "productId": "1392733", "productStatus": "A", "rootOUId": "123", "system": "CCBS" } ], "size": "1" } } } } res.status(200).send(response) } module.exports.getBundleProfileList = async (req, res) => { console.log('===== POST getBundleProfileList =====') 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": "OSBbllngA00001", "message": "Success.", } let response = { "errorCode": "OSBbllngA00001", "message": "Success.", "uuid": "855bb4ff-e41e-4d84-86b3-d96853f79630", "backendResponseList": { "backendResponseInfoArray": [ { "apiName": "getPrimaryKeyInfoByActiveAndBusinessLine", "errorCode": "OSBbllngA00001", "message": "Success.", "system": "OSB", "url": "http://172.19.231.21:8080/ESB_Get_CustomerPreferenceInfo/Interfaces/Proxy/CommonPreferenceInfoPS" }, { "apiName": "getUnbilledCycleInfo", "errorCode": "OSBbllngA00001", "message": "Success.", "system": "CCCSOA", "url": "http://172.19.136.104/BillingServiceIntegration/BillingServiceIntegrationSI" }, { "apiName": "getAccumulatedRatedPerformanceIndicators", "errorCode": "OSBbllngA00001", "message": "Success.", "system": "CCCSOA", "url": "http://172.19.136.104/RaterServiceWS/RaterServiceSI" }, { "apiName": "getOfferDetailList", "errorCode": "OSBbllngA00001", "message": "Success.", "system": "OSB", "url": "http://172.19.231.21:8080/ESB_Get_CustomerDataInfo/Interfaces/Proxy/OfferReferenceInfoPS" } ], "size": 4 }, "billingBundleList": { "billingBundleInfoArray": [ { "cycleInfo": { "closeDay": 27, "code": 28, "endDate": "2021-05-27T00:00:00+07:00", "month": 5, "startDate": "2021-04-28T00:00:00+07:00", "year": 2021 }, "effectiveDate": "2019-11-22T03:23:07.000+07:00", "expirationDate": "2049-12-31T00:00:00.000+07:00", "initialQuota": "200.00", "initialQuotaFormat": "03:20:00", "itemId": "1084229", "lastCallDate": "2021-04-29T23:32:44.000+07:00", "offer": { "code": "11894312", "engBillDescription": "5G Super Max Speed Plus 1399", "name": "TMTOPS18", "socType": "U", "thaiBillDescription": "5G Super Max Speed Plus 1399" }, "offerInstance": 408076475, "remainingQuota": 178.00, "remainingQuotaFormat": "02:58:00", "roundedInitialQuota": 200.00, "roundedInitialQuotaFormat": "03:20:00", "serviceType": "Voice", "uom": { "code": "M", "description": "Minutes" }, "utilizedQuota": 22.00, "utilizedQuotaFormat": "00:22:00" }, { "cycleInfo": { "closeDay": 27, "code": 28, "endDate": "2021-05-27T00:00:00+07:00", "month": 5, "startDate": "2021-04-28T00:00:00+07:00", "year": 2021 }, "effectiveDate": "2021-02-27T18:55:28.000+07:00", "expirationDate": "2049-12-31T00:00:00.000+07:00", "initialQuota": "600.00", "initialQuotaFormat": "10:00:00", "itemId": "12941725", "lastCallDate": "1960-01-01T19:50:00.000+07:00", "offer": { "code": "18373529", "engBillDescription": "5G Super Max Speed Plus 1399", "name": "SMRTFP29", "socType": "P", "thaiBillDescription": "5G Super Max Speed Plus 1399" }, "offerInstance": 760422462, "remainingQuota": 600.00, "remainingQuotaFormat": "10:00:00", "roundedInitialQuota": 600.00, "roundedInitialQuotaFormat": "10:00:00", "serviceType": "Voice", "uom": { "code": "M", "description": "Minutes" }, "utilizedQuota": 0.00, "utilizedQuotaFormat": "00:00:00" }, { "cycleInfo": { "closeDay": 27, "code": 28, "endDate": "2021-05-27T00:00:00+07:00", "month": 5, "startDate": "2021-04-28T00:00:00+07:00", "year": 2021 }, "effectiveDate": "2020-12-17T15:41:12.000+07:00", "expirationDate": "2049-12-31T00:00:00.000+07:00", "initialQuota": "80.00", "initialQuotaFormat": "01:20:00", "itemId": "13699117", "lastCallDate": "1960-01-01T19:50:00.000+07:00", "offer": { "code": "15835629", "engBillDescription": "5G Super Max Speed Plus 1399", "name": "PRORES09", "socType": "U", "thaiBillDescription": "5G Super Max Speed Plus 1399" }, "offerInstance": 710065476, "remainingQuota": 80.00, "remainingQuotaFormat": "01:20:00", "roundedInitialQuota": 80.00, "roundedInitialQuotaFormat": "01:20:00", "serviceType": "Voice", "uom": { "code": "M", "description": "Minutes" }, "utilizedQuota": 0.00, "utilizedQuotaFormat": "00:00:00" } ], "size": 3 }, "ccpBucketBalanceList": null, "classify": "R", "ouBundleList": null, "sbmBundleList": null, "system": "CCBS" } res.status(200).send(response) }