From f6530acd735315148ff5293d40c1c50b75a0b9c6 Mon Sep 17 00:00:00 2001 From: Nattapon W Date: Fri, 30 Jul 2021 10:24:19 +0700 Subject: [PATCH] update mockup true --- app.js | 26 +++++++------------------- ccbs.js | 174 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- crmasset.js | 1084 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- int.js | 10 ++++++++++ sbm.js | 1078 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 1809 insertions(+), 563 deletions(-) create mode 100644 sbm.js diff --git a/app.js b/app.js index 5747101..161ce87 100644 --- a/app.js +++ b/app.js @@ -1,8 +1,6 @@ const express = require('express') const app = express() -const bodyParser = require('body-parser') - const configPartnerList = require('./config_partner.json'); const PartnerManager = require('./req_partner_manager'); @@ -35,23 +33,8 @@ app.use((req, res, next) => { next() }) -app.post('/parse', bodyParser.text('*/*'), async (req, res) => { - console.log('test', req.body) - console.log('test', req.headers) - - try { - JSON.parse(req.body) - } catch (e) { - - } - - res.send(result) - - -}); - -app.use(bodyParser.urlencoded()); -app.use(bodyParser.json()); +app.use(express.urlencoded()); +app.use(express.json()); app.post('/apiRequest', (req, res) => { console.log(req.params.apiRequest) @@ -399,6 +382,7 @@ app.post('/goapi/profile/churnscore/offerlist', require('./ccbs').churnScoreOffe app.get('/goapi/profile/external/customer/usageInfo/:type/:number', require('./ccbs').usageInfo); app.post('/v1/OSBCOM/BillingProfileInfo/UsageProfileInfoREST/getAccumulationUOMGroupList/', require('./ccbs').accumulationUOMGroupList); app.post('/CCBSCommonInfo/MGCommonInfo/getPrimaryKeyListWithoutResourceType', require('./ccbs').getPrimaryKeyListWithoutResourceType); +app.post('/v1/get_bundle_profile_list/', require('./ccbs').getBundleProfileList); app.post('/CRMIAsset/getAssetComponentList', require('./crmasset').getAssetComponentList); @@ -410,6 +394,10 @@ app.post('/MGOfferInfo/NativeOfferInfo/getCurrentSpendingLimitList', require('./ app.post('/MGOfferInfo/NativeOfferInfo/getCurrentCreditLimitAtSubList', require('./int').getCurrentCreditLimitAtSubList); app.post('/MGOfferInfo/NativeOfferInfo/getCurrentSplitChargeInfo', require('./int').getCurrentSplitChargeInfo); +app.post('/SBMWSREALCCP3G15/DoServiceFromXML', express.text({type:"*/*"}), require('./sbm').getCheckBalance_SBMWSREALCCP); +app.post('/SBMWSREAL3G15/DoServiceFromXML', express.text({type:"*/*"}), require('./sbm').getCheckBalance_SBMWSREAL); +app.post('/SBMWSDataIRPos/DoServiceFromXML', express.text({type:"*/*"}), require('./sbm').getCheckBalanceIR); + app.get('/api/callback', require('./line').callback); diff --git a/ccbs.js b/ccbs.js index 05f46a2..4ba18b3 100644 --- a/ccbs.js +++ b/ccbs.js @@ -274,8 +274,8 @@ module.exports.getPrimaryKeyListWithoutResourceType = async (req, res) => { console.log('params', req.params); console.log('body', req.body); - let responseErr ={ - "getPrimaryKeyListWithoutResourceTypeResponse": { + let responseErr = { + "getPrimaryKeyListWithoutResourceTypeResponse": { "return": { "uuid": "f9336125-be9e-4c37-80c4-ab97990100cf", "errorCode": "OSBbllngA10001", @@ -316,3 +316,173 @@ module.exports.getPrimaryKeyListWithoutResourceType = async (req, res) => { 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) +} \ No newline at end of file diff --git a/crmasset.js b/crmasset.js index dab71ea..e4e0f8c 100644 --- a/crmasset.js +++ b/crmasset.js @@ -1,547 +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); + 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 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" - } - ] -} + 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) + res.status(200).send(response) } \ No newline at end of file diff --git a/int.js b/int.js index 8effba4..02283bc 100644 --- a/int.js +++ b/int.js @@ -77,6 +77,16 @@ module.exports.getFuturePromotionList = async (req, res) => { } } + let responseErr1 = `{1 + "getFuturePromotionListResponse": { + "return": { + "uuid": "ed41f948-565c-4900-a94d-ee63100e2fa4", + "errorCode": "OSBbllngA10001", + "message": "error." + } + } + }` + let response = { "getFuturePromotionListResponse": { "return": { diff --git a/sbm.js b/sbm.js new file mode 100644 index 0000000..fdb3be4 --- /dev/null +++ b/sbm.js @@ -0,0 +1,1078 @@ +module.exports.getCheckBalance_SBMWSREALCCP = async (req, res) => { + console.log('===== POST getCheckBalance =====') + 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 = ` + ` + + let response = ` + + + + R19NBPNE2 + V + V + 42.0Mbps + TH + + N + + + + + + + + + + OC + 2020-12-16 14:20:08 + 2021-12-15 23:59:59 + INSTM3GEG + Unlimited + * + 0 + IPK_DS_OC_TRUEIDULM_FREE_365D + ฟรี TrueID HD ไม่จำกัด นาน 12 เดือน + + + OC + 2020-12-16 14:20:14 + 2021-12-15 23:59:59 + WIFI + Unlimited + * + 0 + IPK_DS_OC_ULMWIFI_FREE_365D + ฟรี WiFi ไม่อั้น นาน 12 เดือน + + + OC + 2020-12-16 14:20:14 + 2021-12-15 23:59:59 + STD3GEG + Unlimited + * + 0 + IPK_DS_OC_ULMFIX10M_FREE_365D + เน็ตไม่อั้น 10Mbps นาน 1ปี + + + + + + ` + + let response1 = ` + + + IPK_DS_OC_XXXX + T + T + 512Kbps + EN + + Y + + + + + + + + OC + WEG + 2009-09-06 00:00:00 + 2010-09-06 23:59:59 + 1200 + T + 100 + + + OC + 3GEG + 2009-09-06 00:00:00 + 2010-09-06 23:59:59 + 1200 + T + 100 + + + + + RCQWEQW + 2009-09-06 00:00:00 + - + Voice + 12000 + T + 9300 + + + OCQWEQWE + 2009-09-06 00:00:00 + 2010-09-06 23:59:59 + Voice + 2048 + V + 700 + + + OC + - + - + Voice + Unlimited + T + 0 + + + RC + Voice + 2009-09-06 00:00:00 + 2010-09-06 23:59:59 + SHARED + T + 100 + + + OC + EG + 2009-09-06 00:00:00 + 2010-09-06 23:59:59 + 1200 + T + 100 + + + OC + 2009-09-06 00:00:00 + 2010-09-06 23:59:59 + EG + 1200 + V + 0 + + + RC + 2009-09-06 00:00:00 + 2010-09-06 23:59:59 + EG + Unlimited + V + 0 + + + RC + 2009-09-06 00:00:00 + 2010-09-06 23:59:59 + EG + SHARED + V + 10 + + + + + OC + 2009-09-06 00:00:00 + 2010-09-06 23:59:59 + EG + 12000 + T + 0 + GPAC3S07 + + + RC + 2009-09-06 00:00:00 + - + EG + 13500 + T + 0 + GPAC3S07 + + + RC + 2009-09-06 00:00:00 + - + EG + 8600 + T + 0 + GPAC3S07 + + + OC + 2009-09-06 00:00:00 + 2010-09-06 23:59:59 + EG + 8600 + T + 0 + GPAC3S07 + + + RC + EG + 2009-09-06 00:00:00 + 2010-09-06 23:59:59 + 100 + T + 100 + GPAC3S05 + + + OC + EG + 2009-09-06 00:00:00 + 2010-09-06 23:59:59 + SHARED + T + 0 + GPAC3S05 + + + OC + EG + 2009-09-06 00:00:00 + 2010-09-06 23:59:59 + SHARED + T + 0 + GPAC3S05 + + + RC + EG + 2009-09-06 00:00:00 + 2010-09-06 23:59:59 + 100 + T + 50 + GPAC3S05 + + + OC + 2009-09-06 00:00:00 + 2010-09-06 23:59:59 + EG + Unlimited + T + 0 + GPAC3S061 + + + RC + 2009-09-06 00:00:00 + - + EG + Unlimited + T + 0 + GPAC3S06 + + + + 1 + + IPK + IPK_DS_OC_XXXX + 3GEG + A + 2010-10-04 12:30:20 + 2010-11-03 23:59:59 + V + 500 + 5500 + 6000 + 512Kbps + 42Mbps + + + 2010-10-04 12:30:20 + 2010-11-03 23:59:59 + 42Mbps + + + 2010-10-04 12:30:20 + + 42Mbps + + + + + ` + + res.status(200).send(response1) +} + +module.exports.getCheckBalance_SBMWSREAL = async (req, res) => { + console.log('===== POST getCheckBalance =====') + 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 = ` + ` + + let response = ` + + + + 00001 + 1 + SUCCESS + POS + FV1B1M + T + A + EN + Y + 512KB + 2500 + 9 + 9 + V + 66891288123 + 2 + 66866716795 + N + 2 + 2 + + + 1234 + Recurring + 2009-09-06 00:00:00 + 2010-09-06 23:59:59 + EG + 1200 + T + 100 + + + 1235 + Recurring + 2009-09-06 00:00:00 + 2010-09-06 23:59:59 + WIFI + 1200 + T + 900 + + + + + GPAC3S05 + Buy this pack for free! Unlimited monthly + Y + 512KB + 1 + + + 2973 + Recurring + 2009-09-06 00:00:00 + 2009-10-06 23:59:59 + EG + 1200 + T + 1200 + + + + + GPAC3S05 + Buy this pack for free! Unlimited monthly + N + 512KB + 1 + + + 2974 + NextRC + 2009-10-07 00:00:00 + 2009-11-07 00:00:00 + EG + 1200 + T + 1200 + + + + + + 2 + + + Package + FV1B1M + 3G + A + 2010-10-04 12:30:20 + 2010-11-03 23:59:59 + V + 0 + 5120 + 5120 + 256KB + + + priceplan + IPACKP04 + 3G + E + 2010-10-04 12:30:20 + 2010-11-03 23:59:59 + V + 5120 + 0 + 5120 + 256KB + + + + + +` + + let response1 = ` + + + + 00001 + 1 + SUCCESS + POS + FV1B1M + T + A + EN + Y + 512KB + 2500 + 9 + 9 + V + 66891288123 + 2 + 66866716795 + N + 2 + 2 + + + 1234 + Recurring + 2009-09-06 00:00:00 + 2010-09-06 23:59:59 + EG + 1200 + T + 100 + + + 1235 + Recurring + 2009-09-06 00:00:00 + 2010-09-06 23:59:59 + WIFI + 1200 + T + 900 + + + + + GPAC3S05 + Buy this pack for free! Unlimited monthly + Y + 512KB + 1 + + + 2973 + Recurring + 2009-09-06 00:00:00 + 2009-10-06 23:59:59 + EG + 1200 + T + 1200 + + + + + GPAC3S05 + Buy this pack for free! Unlimited monthly + N + 512KB + 1 + + + 2974 + NextRC + 2009-10-07 00:00:00 + 2009-11-07 00:00:00 + EG + 1200 + T + 1200 + + + + + + 2 + + + Package + IPHONE4 + 3G + A + 2010-10-04 12:30:20 + 2010-11-03 23:59:59 + V + 0 + 5120 + 5120 + 256KB + + + priceplan + IPACKP04 + 3G + E + 2010-10-04 12:30:20 + 2010-11-03 23:59:59 + V + 5120 + 0 + 5120 + 256KB + + + + + +` + + res.status(200).send(response1) +} + +module.exports.getCheckBalanceIR = async (req, res) => { + console.log('===== POST getCheckBalanceIR =====') + 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 = ` + ` + + let response = ` + + + + 00001 + 1 + success + POS + FV1B1M + priceplan roaming unlimited + T + A + TH + 550 + 500 + N + EOAZONE + 512KB + Australia + T-Mobile + 66891288123 + 1 + 66866716795 + N + 1 + 4 + + + 1234 + Recurring + 2009-09-06 00:00:00 + 2010-09-06 23:59:59 + DataRoam + 10240 + V + 10240 + 10240 + + + 1234 + Recurring + 2009-09-06 00:00:00 + 2010-09-06 23:59:59 + DataRoam + 10240 + V + 10240 + 10240 + + + + + TEST_IRDATAS11 + RC 4GB per mounth, 2500 Bath + Y + 2 + + + 238 + Recurring + LIMITED + 2017-12-01 14:02:10 + IRUSSD + xxxxxx + 601 + 2017-12-01 17:00:00 + 2017-12-12 23:59:59 + 2017-12-01 19:00:00 + 2017-12-13 01:59:59 + DataRoam + 1677722 + V + 1677722 + 0 + Max speed + N + Max speed + + + + + + 1201 + Recurring + LIMITED + 2017-12-11 00:00:00 + IRUSSD + xxxxxx + 622 + 2017-12-13 00:00:00 + 2018-01-12 23:59:59 + + + DataRoam + 4194304 + V + 4194304 + 0 + Max speed + N + Max speed + + + + + + + + TEST_IRDATAS05 + Package special rate (cap max per day) per group of operator ie south korea + Y + 2 + + + 0 + Onetime + PPU_W_CAP + 2017-12-12 11:16:12 + IRUSSD + xxxxxx + 623 + 2017-12-12 11:16:12 + 2017-12-13 21:59:59 + 2017-12-12 13:16:12 + 2017-12-13 23:59:59 + DataRoam + + + + + + + + + + + + + 1202 + Onetime + LIMITED + 2017-12-12 11:16:12 + IRAPP + xxxxxx + 624 + 2017-12-12 11:16:12 + 2017-12-15 11:16:12 + 2017-12-12 13:16:12 + 2017-12-15 13:16:12 + DataRoam + 102400 + V + 102400 + 0 + 10Mbp + N + 10Mbp + + + + + + + + TEST_IRDATAS07 + Package special rate without CAP MAX + Y + 1 + + + 0 + Onetime + PPU_WO_CAP + 2017-12-12 11:16:35 + IRAPP + xxxxxx + 626 + 2017-12-12 11:16:35 + 2017-12-15 11:16:35 + 2017-12-12 11:16:35 + 2017-12-15 11:16:35 + DataRoam + + + + + 2Mbps + N + 2Mbps + + + + + + + + TEST_IRDATAS01 + Package data unlimit 1 days 99 Bath + Y + 1 + + + 0 + Onetime + UNLIMITED + 2017-12-12 11:16:46 + IRAPP + xxxxxx + 627 + 2017-12-12 11:16:46 + 2017-12-13 11:16:46 + 2017-12-12 12:16:46 + 2017-12-13 12:16:46 + DataRoam + Unlimited + V + Unlimited + Unlimited + Max speed + N + 512Kbps + 512000 + 512000 + 0 + + + + + + + ` + + let response1 = ` + + + + 00001 + 1 + success + POS + FV1B1M + priceplan roaming unlimited + T + A + TH + 550 + 500 + N + EOAZONE + 512KB + Australia + T-Mobile + 66891288123 + 1 + 66866716795 + N + 1 + 4 + + + 1234 + Recurring + 2009-09-06 00:00:00 + 2010-09-06 23:59:59 + DataRoam + 10240 + V + 10240 + 10240 + + + + + TEST_IRDATAS11 + RC 4GB per mounth, 2500 Bath + Y + 2 + + + 238 + Recurring + LIMITED + 2017-12-01 14:02:10 + IRUSSD + xxxxxx + 601 + 2017-12-01 17:00:00 + 2017-12-12 23:59:59 + 2017-12-01 19:00:00 + 2017-12-13 01:59:59 + DataRoam + 1677722 + V + 1677722 + 0 + Max speed + N + Max speed + + + + + + 1201 + Recurring + LIMITED + 2017-12-11 00:00:00 + IRUSSD + xxxxxx + 622 + 2017-12-13 00:00:00 + 2018-01-12 23:59:59 + + + DataRoam + 4194304 + V + 4194304 + 0 + Max speed + N + Max speed + + + + + + + + TEST_IRDATAS05 + Package special rate (cap max per day) per group of operator ie south korea + + Y + 2 + + + 0 + Onetime + PPU_W_CAP + 2017-12-12 11:16:12 + IRUSSD + xxxxxx + 623 + 2017-12-12 11:16:12 + 2017-12-13 21:59:59 + 2017-12-12 13:16:12 + 2017-12-13 23:59:59 + DataRoam + + + + + + + + + + + + + 1202 + Onetime + LIMITED + 2017-12-12 11:16:12 + IRAPP + xxxxxx + 624 + 2017-12-12 11:16:12 + 2017-12-15 11:16:12 + 2017-12-12 13:16:12 + 2017-12-15 13:16:12 + DataRoam + 102400 + V + 102400 + 0 + 10Mbp + N + 10Mbp + + + + + + + + TEST_IRDATAS07 + Package special rate without CAP MAX + Y + 1 + + + 0 + Onetime + PPU_WO_CAP + 2017-12-12 11:16:35 + IRAPP + xxxxxx + 626 + 2017-12-12 11:16:35 + 2017-12-15 11:16:35 + 2017-12-12 11:16:35 + 2017-12-15 11:16:35 + DataRoam + + + + + 2Mbps + N + 2Mbps + + + + + + + + TEST_IRDATAS01 + Package data unlimit 1 days 99 Bath + Y + 1 + + + 0 + Onetime + UNLIMITED + 2017-12-12 11:16:46 + IRAPP + xxxxxx + 627 + 2017-12-12 11:16:46 + 2017-12-13 11:16:46 + 2017-12-12 12:16:46 + 2017-12-13 12:16:46 + DataRoam + Unlimited + V + Unlimited + Unlimited + Max speed + N + 512Kbps + 512000 + 512000 + 0 + + + + + + + ` + + res.status(200).send(response1) +} \ No newline at end of file -- libgit2 0.21.2