From 7fe25040dd6b5488db73e10e3fb7dbbad0114485 Mon Sep 17 00:00:00 2001 From: Nattapon W Date: Wed, 4 Aug 2021 09:26:33 +0700 Subject: [PATCH] update mockup true --- app.js | 2 ++ ccbs.js | 6 +++--- cccsoa.js | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ sbm.js | 2 +- 4 files changed, 64 insertions(+), 4 deletions(-) create mode 100644 cccsoa.js diff --git a/app.js b/app.js index 161ce87..57bdcaf 100644 --- a/app.js +++ b/app.js @@ -384,6 +384,8 @@ app.post('/v1/OSBCOM/BillingProfileInfo/UsageProfileInfoREST/getAccumulationUOMG app.post('/CCBSCommonInfo/MGCommonInfo/getPrimaryKeyListWithoutResourceType', require('./ccbs').getPrimaryKeyListWithoutResourceType); app.post('/v1/get_bundle_profile_list/', require('./ccbs').getBundleProfileList); +app.post('/v1/CCCSOA/OrganizationInfoWS/OrganizationInfoSI/getAgreementBundleUsageInfo', require('./cccsoa').getAgreementBundleUsageInfo); + app.post('/CRMIAsset/getAssetComponentList', require('./crmasset').getAssetComponentList); app.post('/MGOfferInfo/MGOfferInfo/getAllDiscountList', require('./int').getAllDiscountList); diff --git a/ccbs.js b/ccbs.js index 4ba18b3..092457f 100644 --- a/ccbs.js +++ b/ccbs.js @@ -12,7 +12,7 @@ module.exports.assetDetail = async (req, res) => { } let response = { - "code": "500", + "code": "0", "msg": "success.", "outstandingBalance": 0, "currentBillBalance": 1.61, @@ -64,7 +64,7 @@ module.exports.assetDetail = async (req, res) => { "term": "12", "fee": 0, "startDate": "04/10/2019", - "expireDate": "05/10/2019", + "expireDate": "10/08/2021", "contractIndicator": "No", "offerCode": "12534317", "contractNumber": "-", @@ -76,7 +76,7 @@ module.exports.assetDetail = async (req, res) => { "term": "12", "fee": 0, "startDate": "04/10/2019", - "expireDate": "05/10/2019", + "expireDate": "05/10/2022", "contractIndicator": "No", "offerCode": "12534317", "contractNumber": "-", diff --git a/cccsoa.js b/cccsoa.js new file mode 100644 index 0000000..80b235a --- /dev/null +++ b/cccsoa.js @@ -0,0 +1,58 @@ +module.exports.getAgreementBundleUsageInfo = async (req, res) => { + console.log('===== POST getAgreementBundleUsageInfo =====') + 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 = { + "getAgreementBundleUsageInfoResponse": { + "bundleUsageMEPB": { + "bundleUsageList": [{ + "serviceType": "Voice", + "uomCode": "M", + "remainAmt": "0.00", + "utilizedQuotaFormat": "00:00:00", + "uomDescription": "Minutes", + "allowAmt": "-1.00", + "initialQuotaFormat": "00:0-1:00", + "usageAmt": "0.00", + "feature": "Voice", + "service": "V000US01C", + "remainingQuotaFormat": "00:00:00", + "effectiveDate": "2019-09-22 17:01:51", + "expirationDate": "2049-12-31 00:00:00" + }, + { + "serviceType": "Voice", + "uomCode": "M", + "remainAmt": "626.00", + "utilizedQuotaFormat": "06:14:00", + "uomDescription": "Minutes", + "allowAmt": "1000.00", + "initialQuotaFormat": "16:40:00", + "lastCall": "2021-07-29 15:47:03", + "usageAmt": "374.00", + "feature": "Voice", + "service": "NETSFS21", + "remainingQuotaFormat": "10:26:00", + "effectiveDate": "2019-09-22 17:01:51", + "expirationDate": "2049-12-31 00:00:00" + }], + "errorMessage": { + "errorMessage": "Success.", + "errorCode": "ACAHblG00001" + }, + "totalRecord": "2" + } + } + } + + res.status(200).send(response) +} \ No newline at end of file diff --git a/sbm.js b/sbm.js index fdb3be4..352f857 100644 --- a/sbm.js +++ b/sbm.js @@ -606,7 +606,7 @@ module.exports.getCheckBalance_SBMWSREAL = async (req, res) => { ` - res.status(200).send(response1) + res.status(200).send(response) } module.exports.getCheckBalanceIR = async (req, res) => { -- libgit2 0.21.2