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 responseErr1 = `{1 "getFuturePromotionListResponse": { "return": { "uuid": "ed41f948-565c-4900-a94d-ee63100e2fa4", "errorCode": "OSBbllngA10001", "message": "error." } } }` let response = { "getFuturePromotionListResponse": { "return": { "uuid": "4cee2c7d-37aa-445c-b3da-e2fd0467b53d", "errorCode": "OSBbllngA00001", "message": "Success.", "futureOfferList": { "size": 8, "futureOfferArray": [ { "offer": { "socType": "U", "iddIndicator": "N", "code": "53032", "rcRate": "0.0", "irIndicator": "N", "name": "INTSPS01", "description": "Internation Call Special Rate", "ffIndicator": "N", "serviceLevel": { "code": "C", "description": "Subscriber" }, "cugIndicator": "N" }, "future": { "orderType": { "code": "2", "description": "ChangePP" }, "activityReason": "CREQ", "futureSource": "OMX", "futureSocParentId": "1216", "futureId": "1091", "futureType": "NXTPP", "remark": "RETEAP60->SMRTCP09", "futureSocId": "1220", "createDate": "2018-10-06T17:09:19.000+07:00", "status": { "code": "1", "description": "WAITING" } }, "serviceAgreement": { "agreementSocSequence": null, "agreementId": "1265897", "expirationIssueDate": null, "parentSocSequence": null, "effectiveDate": null, "effectiveIssueDate": "2018-10-06T00:00:00.000+07:00", "socSequence": null, "expirationDate": null, "status": "F" } }, { "offer": { "socType": "P", "iddIndicator": "N", "code": "12996017", "rcRate": "899.0", "irIndicator": "N", "name": "SMRTCP09", "description": "N_4G+ Super Smart 899, Voice500min Net 12 GB Unltd", "ffIndicator": "N", "serviceLevel": { "code": "C", "description": "Subscriber" }, "cugIndicator": "N" }, "future": { "orderType": { "code": "2", "description": "ChangePP" }, "activityReason": "CREQ", "futureSource": "OMX", "futureSocParentId": null, "futureId": "1091", "futureType": "NXTPP", "remark": "RETEAP60->SMRTCP09", "futureSocId": "1216", "createDate": "2018-10-06T17:09:19.000+07:00", "status": { "code": "1", "description": "WAITING" } }, "serviceAgreement": { "agreementSocSequence": null, "agreementId": "1265897", "expirationIssueDate": null, "parentSocSequence": null, "effectiveDate": "2020-11-02T00:00:00.000+07:00", "effectiveIssueDate": "2018-10-06T00:00:00.000+07:00", "socSequence": null, "expirationDate": null, "status": "F" } }, { "offer": { "socType": "U", "iddIndicator": "N", "code": "41701", "rcRate": "0.0", "irIndicator": "N", "name": "RMPGPS01", "description": "GPRS Provisioning SOC - RMV (HMMS,HINTERNET)", "ffIndicator": "N", "serviceLevel": { "code": "C", "description": "Subscriber" }, "cugIndicator": "N" }, "future": { "orderType": { "code": "2", "description": "ChangePP" }, "activityReason": "CREQ", "futureSource": "OMX", "futureSocParentId": "1216", "futureId": "1091", "futureType": "NXTPP", "remark": "RETEAP60->SMRTCP09", "futureSocId": "1219", "createDate": "2018-10-06T17:09:19.000+07:00", "status": { "code": "1", "description": "WAITING" } }, "serviceAgreement": { "agreementSocSequence": null, "agreementId": "1265897", "expirationIssueDate": null, "parentSocSequence": null, "effectiveDate": null, "effectiveIssueDate": "2018-10-06T00:00:00.000+07:00", "socSequence": null, "expirationDate": null, "status": "F" } }, { "offer": { "socType": "U", "iddIndicator": "N", "code": "41661", "rcRate": "0.0", "irIndicator": "N", "name": "RMHSPS04", "description": "Hi-Speed 3G/EDGE/GPRS 42.0 Mbps - PostPay", "ffIndicator": "N", "serviceLevel": { "code": "C", "description": "Subscriber" }, "cugIndicator": "N" }, "future": { "orderType": { "code": "2", "description": "ChangePP" }, "activityReason": "CREQ", "futureSource": "OMX", "futureSocParentId": "1216", "futureId": "1091", "futureType": "NXTPP", "remark": "RETEAP60->SMRTCP09", "futureSocId": "1218", "createDate": "2018-10-06T17:09:19.000+07:00", "status": { "code": "1", "description": "WAITING" } }, "serviceAgreement": { "agreementSocSequence": null, "agreementId": "1265897", "expirationIssueDate": null, "parentSocSequence": null, "effectiveDate": null, "effectiveIssueDate": "2018-10-06T00:00:00.000+07:00", "socSequence": null, "expirationDate": null, "status": "F" } }, { "offer": { "socType": "U", "iddIndicator": "N", "code": "40941", "rcRate": "0.0", "irIndicator": "N", "name": "PROSTDA1", "description": "Standard Provisioning Services for Post Pay # 1", "ffIndicator": "N", "serviceLevel": { "code": "C", "description": "Subscriber" }, "cugIndicator": "N" }, "future": { "orderType": { "code": "2", "description": "ChangePP" }, "activityReason": "CREQ", "futureSource": "OMX", "futureSocParentId": "1216", "futureId": "1091", "futureType": "NXTPP", "remark": "RETEAP60->SMRTCP09", "futureSocId": "1217", "createDate": "2018-10-06T17:09:19.000+07:00", "status": { "code": "1", "description": "WAITING" } }, "serviceAgreement": { "agreementSocSequence": null, "agreementId": "1265897", "expirationIssueDate": null, "parentSocSequence": null, "effectiveDate": null, "effectiveIssueDate": "2018-10-06T00:00:00.000+07:00", "socSequence": null, "expirationDate": null, "status": "F" } }, { "offer": { "socType": "U", "iddIndicator": "N", "code": "59532", "rcRate": "0.0", "irIndicator": "N", "name": "RMGPSS01", "description": "GPRS Unlimited", "ffIndicator": "N", "serviceLevel": { "code": "C", "description": "Subscriber" }, "cugIndicator": "N" }, "future": { "orderType": { "code": "2", "description": "ChangePP" }, "activityReason": "CREQ", "futureSource": "OMX", "futureSocParentId": "1216", "futureId": "1091", "futureType": "NXTPP", "remark": "RETEAP60->SMRTCP09", "futureSocId": "1221", "createDate": "2018-10-06T17:09:19.000+07:00", "status": { "code": "1", "description": "WAITING" } }, "serviceAgreement": { "agreementSocSequence": null, "agreementId": "1265897", "expirationIssueDate": null, "parentSocSequence": null, "effectiveDate": null, "effectiveIssueDate": "2018-10-06T00:00:00.000+07:00", "socSequence": null, "expirationDate": null, "status": "F" } }, { "offer": { "socType": "U", "iddIndicator": "N", "code": "12900522", "rcRate": "0.0", "irIndicator": "N", "name": "RETENS69", "description": "Retention Voice Free 100 Mins (All Net) 12 Months", "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": "844758", "createDate": "2019-04-29T10:23:10.000+07:00", "status": { "code": "B", "description": "PROCESSING" } }, "serviceAgreement": { "agreementSocSequence": null, "agreementId": "1265897", "expirationIssueDate": null, "parentSocSequence": null, "effectiveDate": "2018-10-08T00:00:00.000+07:00", "effectiveIssueDate": "2019-04-29T10:23:10.000+07:00", "socSequence": "844758", "expirationDate": "2019-10-08T00:00:00.000+07:00", "status": "F" } }, { "offer": { "socType": "D", "iddIndicator": "N", "code": "14009917", "rcRate": "0.0", "irIndicator": "N", "name": "RET037", "description": "Privilege Discount 50% 12 mth", "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": "844751", "createDate": "2019-04-29T10:23:10.000+07:00", "status": { "code": "B", "description": "PROCESSING" } }, "serviceAgreement": { "agreementSocSequence": null, "agreementId": "1265897", "expirationIssueDate": null, "parentSocSequence": null, "effectiveDate": "2018-10-08T00:00:00.000+07:00", "effectiveIssueDate": "2019-04-29T10:23:10.000+07:00", "socSequence": "844751", "expirationDate": "2019-10-08T00: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": "8efed95c-3b54-4491-8f1f-e32fa7a6feb4", "errorCode": "INT00001", "message": "Success.", "cugOfferList": { "cugOfferArray": [{ "cug": { "groupDescription": "คนสวยเทสเท่านั้น", "groupId": "7465", "groupIdentifier": "สุภาพรรณทดสอบจริง", "groupName": "AMTESTKA", "groupType": "GAS" }, "offerInfo": { "code": "20471", "description": "Closed User Group (CUG) service", "name": "CUGFRS05", "serviceLevel": { "code": "C", "description": "Subscriber" }, "socType": "U" }, "serviceAgreement": { "agreementSocSequence": 827884, "agreementId": 1230507, "expirationIssueDate": null, "parentSocSequence": 827884, "effectiveDate": "2018-08-23T00:00:00.000+07:00", "effectiveIssueDate": "2018-08-23T13:38:42.000+07:00", "socSequence": 827886, "expirationDate": null, "status": "A" } }, { "cug": { "groupDescription": "คนสวยเทสเท่านั้น", "groupId": "7465", "groupIdentifier": "สุภาพรรณทดสอบจริง", "groupName": "AMTESTKA", "groupType": "GAS" }, "offerInfo": { "code": "15152721", "description": "Close User Group (Free) - Family deal", "name": "CUGFRS14", "serviceLevel": { "code": "C", "description": "Subscriber" }, "socType": "U" }, "serviceAgreement": { "agreementSocSequence": 827883, "agreementId": 1230507, "expirationIssueDate": null, "parentSocSequence": 827883, "effectiveDate": "2018-08-23T00:00:00.000+07:00", "effectiveIssueDate": "2018-08-23T13:38:42.000+07:00", "socSequence": 827885, "expirationDate": null, "status": "A" } }], "size": 2 } } 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": "805b0218-32e4-4e15-a2ab-d8923be46850", "errorCode": "INT00001", "message": "Success.", "creditLimitAtSubList": { "creditLimitAtSubArray": [ { "creditLimitAtSubInfo": { "firstTriggerPercent": 0, "incrementTriggerPercent": 0, "permanentThreshold": 1000, "temporaryThreshold": 2000 }, "offerInfo": { "code": "212158", "description": "Credit_Limit_at_Sub for Enterprise", "name": "Credit_Limit_at_Sub", "serviceLevel": { "code": "C", "description": "Subscriber" }, "socType": "U" }, "serviceAgreement": { "agreementSocSequence": 827892, "agreementId": 1230507, "expirationIssueDate": null, "parentSocSequence": null, "effectiveDate": "2018-08-23T13:50:24.000+07:00", "effectiveIssueDate": "2018-08-23T13:50:24.000+07:00", "socSequence": 827892, "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) } module.exports.getBillImage = async (req, res) => { console.log('===== POST getBillImage =====') console.log('url', req.originalUrl); console.log('headers', req.headers); console.log('query', req.query); console.log('params', req.params); console.log('body', JSON.stringify(req.body)); let responseErr = { "errorCode": "INT10001", "message": "error.", } let response = { "errorCode": "OSBbllngA00001", "message": "Success.", "uuid": "e3d8a473-6111-48cb-bf7c-dc0e5c024d24", "backendResponseList": { "backendResponseInfoArray": [ { "apiName": "getBillDocumentInfo", "errorCode": "OSBbllngA00001", "message": "Success.", "system": "OSB", "url": "http://172.19.204.90:8011/ESB_Get_FinancialManagementInfo/Interfaces/Proxy/BillingInfoPS" }, { "apiName": "getBillImageBySearchList", "errorCode": "OSBbllngA00001", "message": "Success.", "system": "CCCSOA", "url": "http://172.19.216.171:8180/BillingServiceIntegration/BillingServiceIntegrationSI" } ], "size": 2 }, "billImageInfo": { "fileBytesArray": "JVBERi0xLjYKJeLjz9MKMSAwIG9iago8PAovVHlwZSAvQ2F0YWxvZwovUGFnZXMg..." } } res.status(200).send(response) } module.exports.getAdjustmentSummaryAmount = async (req, res) => { console.log('===== POST getAdjustmentSummaryAmount =====') console.log('url', req.originalUrl); console.log('headers', req.headers); console.log('query', req.query); console.log('params', req.params); console.log('body', JSON.stringify(req.body)); let responseErr = { "getAdjustmentSummaryAmountResponse": { "return": { "errorCode": "OSBbllngA10001", "message": "Error.", "uuid": "e6717ec3-944b-4221-8825-3d32cf84bf35" } } } let response = { "getAdjustmentSummaryAmountResponse": { "return": { "adjustmentSummaryAmountInfo": { "taxAmount": "31.45", "adjustmentAmount": "449.25" }, "errorCode": "OSBbllngA00001", "message": "Success.", "uuid": "e6717ec3-944b-4221-8825-3d32cf84bf35" } } } res.status(200).send(response) } module.exports.getAdjustmentHistoryList = async (req, res) => { console.log('===== POST getAdjustmentHistoryList =====') console.log('url', req.originalUrl); console.log('headers', req.headers); console.log('query', req.query); console.log('params', req.params); console.log('body', JSON.stringify(req.body)); let responseErr = { "getAdjustmentHistoryListResponse": { "return": { "errorCode": "OSBbllngA10001", "message": "Error.", "uuid": "e6717ec3-944b-4221-8825-3d32cf84bf35" } } } let response = { "getAdjustmentHistoryListResponse": { "return": { "totalSize": "7", "adjustmentList": { "size": "7", "adjustmentInfoArray": [ { "adjustmentAllocationList": { "size": "1", "adjustmentAllocationInfoArray": [ { "invoiceId": "1513968231", "invoiceNo": "010320211051308907", "allocatedCreditAmount": "480.7" } ] }, "totalAmount": "480.7", "amount": "449.25", "creditDate": "2021-04-08T00:00:00.000+07:00", "creditId": "775866320", "creditLevelCode": "DEB", "reversalReason": "", "creditReason": "CRMG01", "creditNoteNo": "CA-RM-2104036728", "taxAmount": "31.45", "userId": "2-372544013733:01028828", "memoText": "Wanidchaya Srihata" }, { "adjustmentAllocationList": { "size": "1", "adjustmentAllocationInfoArray": [ { "invoiceId": "1490481280", "invoiceNo": "010220211039639824", "allocatedCreditAmount": "640.93" } ] }, "totalAmount": "640.93", "amount": "599", "creditDate": "2021-04-08T00:00:00.000+07:00", "creditId": "776485485", "creditLevelCode": "DEB", "reversalReason": "", "creditReason": "CRMG01", "creditNoteNo": "CA-RM-2104036727", "taxAmount": "41.93", "userId": "2-372544013733:01028828", "memoText": "Wanidchaya Srihata" }, { "adjustmentAllocationList": { "size": "1", "adjustmentAllocationInfoArray": [ { "invoiceId": "1467304418", "invoiceNo": "010120211027964113", "allocatedCreditAmount": "640.93" } ] }, "totalAmount": "640.93", "amount": "599", "creditDate": "2021-04-08T00:00:00.000+07:00", "creditId": "776579004", "creditLevelCode": "DEB", "reversalReason": "", "creditReason": "CRMG01", "creditNoteNo": "CA-RM-2104036726", "taxAmount": "41.93", "userId": "2-372544013733:01028828", "memoText": "Wanidchaya Srihata" }, { "adjustmentAllocationList": { "size": "1", "adjustmentAllocationInfoArray": [ { "invoiceId": "1443542918", "invoiceNo": "011220201016331633", "allocatedCreditAmount": "640.93" } ] }, "totalAmount": "640.93", "amount": "599", "creditDate": "2021-04-08T00:00:00.000+07:00", "creditId": "776485484", "creditLevelCode": "DEB", "reversalReason": "", "creditReason": "CRMG01", "creditNoteNo": "CA-RM-2104036725", "taxAmount": "41.93", "userId": "2-372544013733:01028828", "memoText": "Wanidchaya Srihata" }, { "adjustmentAllocationList": { "size": "1", "adjustmentAllocationInfoArray": [ { "invoiceId": "1420401161", "invoiceNo": "011120201004647268", "allocatedCreditAmount": "640.93" } ] }, "totalAmount": "640.93", "amount": "599", "creditDate": "2021-04-08T00:00:00.000+07:00", "creditId": "775891146", "creditLevelCode": "DEB", "reversalReason": "", "creditReason": "CRMG01", "creditNoteNo": "CA-RM-2104036724", "taxAmount": "41.93", "userId": "2-372544013733:01028828", "memoText": "Wanidchaya Srihata" }, { "adjustmentAllocationList": { "size": "1", "adjustmentAllocationInfoArray": [ { "invoiceId": "1397327056", "invoiceNo": "011020201093071353", "allocatedCreditAmount": "400.58" } ] }, "totalAmount": "400.58", "amount": "374.37", "creditDate": "2021-04-08T00:00:00.000+07:00", "creditId": "776579003", "creditLevelCode": "DEB", "reversalReason": "", "creditReason": "CRMG01", "creditNoteNo": "CA-RM-2104036723", "taxAmount": "26.21", "userId": "2-372544013733:01028828", "memoText": "Wanidchaya Srihata" }, { "adjustmentAllocationList": { "size": "2", "adjustmentAllocationInfoArray": [ { "invoiceId": "43535305", "invoiceNo": "9082014105646265", "allocatedCreditAmount": "13.66" }, { "invoiceId": "0", "invoiceNo": "UNAPPLIED", "allocatedCreditAmount": "0" } ] }, "totalAmount": "13.66", "amount": "12.77", "creditDate": "2014-10-22T00:00:00.000+07:00", "creditId": "56014584", "creditLevelCode": "DEB", "reversalReason": "", "creditReason": "ECH001", "creditNoteNo": "CA-RM-1410019455", "taxAmount": "0.89", "userId": "417926", "memoText": "ADJ_SOC_4G_Error" } ] }, "calculatedPageSize": "100", "errorCode": "OSBbllngA00001", "message": "Success.", "uuid": "a4af56a7-9c80-4dc3-b31f-5ff93ba0277a" } } } res.status(200).send(response) } module.exports.getTdsList = async (req, res) => { console.log('===== POST getTdsList =====') console.log('url', req.originalUrl); console.log('headers', req.headers); console.log('query', req.query); console.log('params', req.params); console.log('body', JSON.stringify(req.body)); let responseErr = { "errorCode": "INT10002", "message": "Error.", } let response = { "uuid": "6487362b-b489-4d32-b345-afd094c64643", "errorCode": "INT00001", "message": "Success.", "backendResponseList": { "size": 5, "backendResponseInfoArray": [ { "apiName": "getTDSPrimaryKeyList", "errorCode": "INT00001", "message": "Success. [uuid=13d8b65c-1544-4925-9fe6-bc3b33bdf355, correlatedId=a2c574b0-2189-4d2d-ae64-069cf38c88f5, primResourceValue=0971310696]", "system": "INTX", "url": "http://apigw.intx.true.th/CCBSCommonInfo/CCBSCommonInfo/getTDSPrimaryKeyList" }, { "apiName": "OSB-GETACCOUNTINFO", "errorCode": "OSBbllngA00001", "message": "Success. [uuid=ae8340e1-18f0-43f4-a6a2-3c8fde30ab19, correlatedId=a2c574b0-2189-4d2d-ae64-069cf38c88f5, accountId=269208142]", "system": "OSB", "url": "http://apigw.intx.true.th/MGCustomerInfo/MGCustomerInfo/getAccountInfo" }, { "apiName": "OSB-GETOPENINVOICELIST", "errorCode": "OSBbllngA00001", "message": "Success. [uuid=269718da-b006-40d3-a943-71759b333c4f, correlatedId=a2c574b0-2189-4d2d-ae64-069cf38c88f5, accountId=269208142]", "system": "OSB", "url": "http://apigw.intx.true.th/MGCCBSInvoiceInfo/MGCCBSInvoiceInfo/getOpenInvoiceList/269208142/100/1/a2c574b0-2189-4d2d-ae64-069cf38c88f5" }, { "apiName": "OSB-GETPRODUCTINFO", "errorCode": "OSBbllngA00001", "message": "Success. [uuid=f4c305f7-a071-49a3-a327-e043578aa0bc, correlatedId=a2c574b0-2189-4d2d-ae64-069cf38c88f5, subscriberId=118001855]", "system": "OSB", "url": "http://apigw.intx.true.th/MGProductInfo/MGProductInfo/getProductInfo" }, { "apiName": "getCurrentContractList", "errorCode": "INT00001", "message": "Success. [uuid=0648b363-cfa8-4d4a-84f2-079f21224744, correlatedId=a2c574b0-2189-4d2d-ae64-069cf38c88f5, agreementId=86217634]", "system": "INTX", "url": "http://apigw.intx.true.th/MGContractInfo/NativeContractInfo/getCurrentContractListBySearchList" } ] }, "tdsList": { "size": 1, "tdsInfoArray": [ { "account": { "accountId": 269208142, "arBalance": 9510.0 }, "subscriber": { "subscriberId": 118001855, "subscriberType": "TH" }, "invoiceList": { "size": 1, "invoiceInfoArray": [ { "invoiceId": 1471215586, "baNo": 269208142, "invoiceBcBanId": null, "billSequenceNo": -1, "invoiceNo": "AR1471215586", "invoiceType": "IMCG", "invoiceStatus": "O", "coverageEndDate": null, "coverageStartDate": null, "dueDate": "2021-01-17T00:00:00.000+07:00", "billAmount": 9510.0, "unpaidAmount": 9510.0, "discountAmount": 0.0, "billTaxAmount": 0.0, "vatRate": 0.0, "invoiceCycle": { "code": 25, "month": 1, "year": 2021 } } ] } } ] }, "contractSummary": { "totalFee": 0.0, "agreementId": 86217634 } } res.status(200).send(response) } module.exports.getFinalChargeInfo = async (req, res) => { console.log('===== POST getTdsList =====') console.log('url', req.originalUrl); console.log('headers', req.headers); console.log('query', req.query); console.log('params', req.params); console.log('body', JSON.stringify(req.body)); let responseErr = { "errorCode": "OSBbllngA10002", "message": "Error.", } let response = { "errorCode": "OSBbllngA00001", "message": "Success.", "uuid": "3901b80c-10fa-4455-8242-6fb07fbb11c5", "backendResponseList": { "backendResponseInfoArray": [{ "apiName": "getPrimaryKeyInfoByActiveAndBusinessLine", "errorCode": "OSBbllngA00001", "message": "Success.", "system": "OSB", "url": "http://172.19.188.21:8080/ESB_Get_CustomerPreferenceInfo/Interfaces/Proxy/CommonPreferenceInfoPS" }, { "apiName": "validate-finalbill-resource", "errorCode": "OSBbllngA00001", "message": "Success.", "system": "CCB-BDV-CM", "url": "http://billsim.true.th/billsimulator/finalbill/validate/resource/" }, { "apiName": "calculate-finalbill-resource", "errorCode": "OSBbllngA00001", "message": "Success.", "system": "CCB-BDV-CM", "url": "http://billsim.true.th/billsimulator/finalbill/resource/" }, { "apiName": "l9GetCreditLimitWithPerformanceIndicators", "errorCode": "OSBbllngA00001", "message": "Success.", "system": "CCCSOA", "url": "http://172.19.136.104/BillingServiceIntegration/BalanceService" }, { "apiName": "getAccountCustomerPreferenceList", "errorCode": "OSBbllngA00001", "message": "Success.", "system": "OSB", "url": "http://172.19.188.21:8080/ESB_Get_CustomerPreferenceInfo/Interfaces/Proxy/CustomerPreferenceInfoPS" }], "size": 5 }, "accountId": 253213439, "accountSplitParam": null, "accountSplitParamForSplitPCN": null, "allowedFinalChargeIndicator": "Y", "arBalance": 11759.3, "arBalanceSplitPCN": null, "billSIMNetAmount": 901.55, "billSIMValidationIndicator": "Y", "convergenceIndicator": null, "creditAvailable": -7359.30, "creditLimit": 4400.0, "creditLimitForSplitPCN": null, "creditLimitWaiver": "N", "creditLimitWaiverExpDate": "1960-01-01T00:00:00.000+07:00", "defaultCreditLimit": 1000.0, "discount": 12, "minPayCancel": 12660.85, "minPayCancelCalculationInfo": { "fieldInfoArray": [{ "name": "billSIMNetAmount", "value": "901.55" }, { "name": "totalObligation", "value": "11759.30" }] }, "minpay": 11759.30, "minpayCreditLimit": 8239.3, "pendingRCOC": 0, "proratedRC": 901.55, "splitPCN": null, "totalObligation": 11759.3, "totalObligationForSplitPCN": null, "unbilledUsage": 0 } res.status(200).send(response) } module.exports.getPayChannel = async (req, res) => { console.log('===== GET getPayChannel =====') console.log('url', req.originalUrl); console.log('headers', req.headers); console.log('query', req.query); console.log('params', req.params); console.log('body', JSON.stringify(req.body)); let responseErr = { "getPayChannelInfoResponse": { "return": { "errorCode": "OSBbllngA00001", "message": "Success.", "uuid": "c8f2d372-1ba2-49d7-9c8a-830a44af9977" } } } let response = { "getPayChannelInfoResponse": { "return": { "errorCode": "OSBbllngA00001", "payChannelInfo": { "statusDate": "2019-03-27T00:00:00.000+07:00", "billingArrangementId": "200078606", "recurringFrequency": "", "creditCardNo": "", "recurringFrequencyValue": "", "bankBranchName": "", "bankAccountNo": "", "bankName": "", "creditCardType": "", "payChannelStatus": "O", "paymentType": "N", "customerId": "187374", "ddApprovalDate": "", "bankCode": "", "creditCardExpirationDate": "", "recurringAmount": "", "paymentCategory": "POST", "paymentMeansOwnerDetails": "คุณ สัปปะรด ผลไม้", "businessEntityId": "0", "paymentMethodDesc": "Cash Payment", "bankAccountType": "", "payChannelNo": "200078606", "bankBranchNo": "", "billingArrangementNo": "1", "paymentMethod": "CA", "openDate": "2019-03-27T00:00:00.000+07:00" }, "message": "Success.", "uuid": "c8f2d372-1ba2-49d7-9c8a-830a44af9977" } } } res.status(200).send(response) }