Commit 2c9525214ac30d0020fd160f92f9c06321dd6357
1 parent
e84546ae
Exists in
develop
update mockup project true crm
Showing
8 changed files
with
2867 additions
and
5 deletions
Show diff stats
app.js
@@ -396,14 +396,35 @@ app.post('/MGOfferInfo/NativeOfferInfo/getCurrentSpendingLimitList', require('./ | @@ -396,14 +396,35 @@ app.post('/MGOfferInfo/NativeOfferInfo/getCurrentSpendingLimitList', require('./ | ||
396 | app.post('/MGOfferInfo/NativeOfferInfo/getCurrentCreditLimitAtSubList', require('./int').getCurrentCreditLimitAtSubList); | 396 | app.post('/MGOfferInfo/NativeOfferInfo/getCurrentCreditLimitAtSubList', require('./int').getCurrentCreditLimitAtSubList); |
397 | app.post('/MGOfferInfo/NativeOfferInfo/getCurrentSplitChargeInfo', require('./int').getCurrentSplitChargeInfo); | 397 | app.post('/MGOfferInfo/NativeOfferInfo/getCurrentSplitChargeInfo', require('./int').getCurrentSplitChargeInfo); |
398 | app.post('/v1/get_BillImage/', require('./int').getBillImage); | 398 | app.post('/v1/get_BillImage/', require('./int').getBillImage); |
399 | +app.post('/v1/OSB/get_AdjustmentSummaryAmount/', require('./int').getAdjustmentSummaryAmount); | ||
400 | +app.post('/v1/OSB/get_AdjustmentHistoryList/', require('./int').getAdjustmentHistoryList); | ||
401 | +app.post('/GatheringBillingInfo/GatheringBillingInfo/getTDSList', require('./int').getTdsList); | ||
402 | +app.post('/v1/get_FinalChargeInfo/', require('./int').getFinalChargeInfo); //postpay | ||
403 | +app.get('/v1/get_PayChannelInfo/:ban', require('./int').getPayChannel); | ||
399 | 404 | ||
400 | app.get('/MGCCBSInvoiceInfo/MGCCBSInvoiceInfo/getAllCCBSInvoiceList/:ban/:pageSize/:pageNo', require('./intx').getAllCCBSInvoiceList); | 405 | app.get('/MGCCBSInvoiceInfo/MGCCBSInvoiceInfo/getAllCCBSInvoiceList/:ban/:pageSize/:pageNo', require('./intx').getAllCCBSInvoiceList); |
401 | app.get('/FinancialTransaction/MGPaymentInfo/getPaymentList/:ban/:pageSize/:pageNo', require('./intx').getPaymentList); | 406 | app.get('/FinancialTransaction/MGPaymentInfo/getPaymentList/:ban/:pageSize/:pageNo', require('./intx').getPaymentList); |
407 | +app.post('/MGContractInfo/MGContractInfo/getCurrentContractList', require('./intx').getCurrentContractList); | ||
408 | +app.post('/MGCustomerInfo/MGCustomerInfo/getAccountInfo', require('./intx').getAccountInfo); | ||
409 | + | ||
410 | +app.post('/v1/get_AccountCustomerInfo/', require('./postpay_true').getAccountCustomerInfo); //postpay | ||
411 | +app.get('/v1/get_LastInvoiceList/:accountId/:pageSize', require('./postpay_true').getLastInvoiceList); //postpay | ||
412 | +app.post('/v1/OSB/get_LastDocumentList/', require('./postpay_true').getLastDocumentList); //postpay | ||
413 | +app.post('/v1/get_CreditLimitInfo/', require('./postpay_true').getCreditLimitInfo); //postpay | ||
414 | +app.get('/MGBillingInfo/MGBillingInfo/getBillMediaInfo/:accountId/', require('./postpay_true').getBillMediaInfo); //postpay | ||
415 | +app.post('/MGProductInfo/MGProductHistoryInfo/getProductHistoryList', require('./postpay_true').getProductHistoryList); //postpay | ||
416 | +app.get('/v1/get_PaymentList/:accountId/:pageSize/:pageNumber/', require('./postpay_true').getPaymentList); //postpay | ||
417 | +app.get('/v1/get_BillingAddress/:ban', require('./postpay_true').getBillingAddress); //postpay | ||
418 | +app.post('/MCS/enquiry/subscriptioninfo/', require('./postpay_true').getDCBStatus); //postpay | ||
419 | +app.post('/AggregateBillingInfo/MGBalanceInfo/getBalanceList', require('./postpay_true').getBalanceList); //postpay | ||
420 | +app.post('/APIConnector/services/EnterpriseIntegration', express.text({type:"*/*"}), require('./postpay_true').sumCollectionAmount); //postpay | ||
402 | 421 | ||
403 | app.post('/SBMWSREALCCP3G15/DoServiceFromXML', express.text({type:"*/*"}), require('./sbm').getCheckBalance_SBMWSREALCCP); | 422 | app.post('/SBMWSREALCCP3G15/DoServiceFromXML', express.text({type:"*/*"}), require('./sbm').getCheckBalance_SBMWSREALCCP); |
404 | app.post('/SBMWSREAL3G15/DoServiceFromXML', express.text({type:"*/*"}), require('./sbm').getCheckBalance_SBMWSREAL); | 423 | app.post('/SBMWSREAL3G15/DoServiceFromXML', express.text({type:"*/*"}), require('./sbm').getCheckBalance_SBMWSREAL); |
405 | app.post('/SBMWSDataIRPos/DoServiceFromXML', express.text({type:"*/*"}), require('./sbm').getCheckBalanceIR); | 424 | app.post('/SBMWSDataIRPos/DoServiceFromXML', express.text({type:"*/*"}), require('./sbm').getCheckBalanceIR); |
406 | 425 | ||
426 | +app.post('/CCPGW_ServiceWeb/Services/QueryUserProfile', express.text({type:"*/*"}), require('./ccp').userProfile); | ||
427 | +app.post('/CCPGW_ServiceWeb/Services/QryBalanceList', express.text({type:"*/*"}), require('./ccp').balance); | ||
407 | 428 | ||
408 | app.get('/api/callback', require('./line').callback); | 429 | app.get('/api/callback', require('./line').callback); |
409 | 430 |
ccbs.js
@@ -14,7 +14,7 @@ module.exports.assetDetail = async (req, res) => { | @@ -14,7 +14,7 @@ module.exports.assetDetail = async (req, res) => { | ||
14 | let response = { | 14 | let response = { |
15 | "code": "0", | 15 | "code": "0", |
16 | "msg": "success.", | 16 | "msg": "success.", |
17 | - "outstandingBalance": 0, | 17 | + "outstandingBalance": 1, |
18 | "currentBillBalance": 1.61, | 18 | "currentBillBalance": 1.61, |
19 | "dueDate": "21/11/2020", | 19 | "dueDate": "21/11/2020", |
20 | "subStatus": { | 20 | "subStatus": { |
@@ -62,7 +62,7 @@ module.exports.assetDetail = async (req, res) => { | @@ -62,7 +62,7 @@ module.exports.assetDetail = async (req, res) => { | ||
62 | "propositionCode": "CVG000000000052", | 62 | "propositionCode": "CVG000000000052", |
63 | "propositionDescription": "TrueSmartChoice Regu 4G No Limit", | 63 | "propositionDescription": "TrueSmartChoice Regu 4G No Limit", |
64 | "term": "12", | 64 | "term": "12", |
65 | - "fee": 0, | 65 | + "fee": 123, |
66 | "startDate": "04/10/2019", | 66 | "startDate": "04/10/2019", |
67 | "expireDate": "10/08/2021", | 67 | "expireDate": "10/08/2021", |
68 | "contractIndicator": "No", | 68 | "contractIndicator": "No", |
@@ -74,7 +74,7 @@ module.exports.assetDetail = async (req, res) => { | @@ -74,7 +74,7 @@ module.exports.assetDetail = async (req, res) => { | ||
74 | "propositionCode": "CVG000000000052", | 74 | "propositionCode": "CVG000000000052", |
75 | "propositionDescription": "TrueSmartChoice Regu 4G No Limit", | 75 | "propositionDescription": "TrueSmartChoice Regu 4G No Limit", |
76 | "term": "12", | 76 | "term": "12", |
77 | - "fee": 0, | 77 | + "fee": "xxxx", |
78 | "startDate": "04/10/2019", | 78 | "startDate": "04/10/2019", |
79 | "expireDate": "05/10/2022", | 79 | "expireDate": "05/10/2022", |
80 | "contractIndicator": "No", | 80 | "contractIndicator": "No", |
@@ -0,0 +1,185 @@ | @@ -0,0 +1,185 @@ | ||
1 | +module.exports.userProfile = async (req, res) => { | ||
2 | + console.log('===== POST userProfile =====') | ||
3 | + console.log('url', req.originalUrl); | ||
4 | + console.log('headers', req.headers); | ||
5 | + console.log('query', req.query); | ||
6 | + console.log('params', req.params); | ||
7 | + console.log('body', req.body); | ||
8 | + | ||
9 | + let response = `<?xml version='1.0' encoding='UTF-8'?> | ||
10 | + <S:Envelope | ||
11 | + xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> | ||
12 | + <S:Body> | ||
13 | + <ns2:processQueryUserProfileResponse | ||
14 | + xmlns:ns2="http://queryuserprofile.ws.ccpgw.trueinfo.th/"> | ||
15 | + <queryUserProfileRes> | ||
16 | + <authReqM> | ||
17 | + <cpid>TRUCRM</cpid> | ||
18 | + <appid>0001</appid> | ||
19 | + <cpTransactionId>8f11f2a5-99be-4a19-b662-b75d9ae76fba</cpTransactionId> | ||
20 | + <gwTransactionId>GWTRUCRM000121081714S200863DC9</gwTransactionId> | ||
21 | + </authReqM> | ||
22 | + <resultResM> | ||
23 | + <result>0</result> | ||
24 | + <resultDesc>success</resultDesc> | ||
25 | + </resultResM> | ||
26 | + <queryUserProfileResM> | ||
27 | + <msisdn>66877157090</msisdn> | ||
28 | + <acntStopDate>2018-03-13</acntStopDate> | ||
29 | + <completedDate>2018-03-13 07-21-11</completedDate> | ||
30 | + <gPRSChargeFlag>1</gPRSChargeFlag> | ||
31 | + <certType></certType> | ||
32 | + <certNo></certNo> | ||
33 | + <customerName>66877157090</customerName> | ||
34 | + <address>Real Move|</address> | ||
35 | + <defLang>1</defLang> | ||
36 | + <custType>A</custType> | ||
37 | + <productCode>PreRB</productCode> | ||
38 | + <productName>PreRB</productName> | ||
39 | + <pricePlanCode>R18NSB123</pricePlanCode> | ||
40 | + <imsi>520002071474784</imsi> | ||
41 | + <iccid>18031300000043669279</iccid> | ||
42 | + <pricePlanDtoList> | ||
43 | + <pricePlanDto> | ||
44 | + <pricePlanCode>R18NSB123</pricePlanCode> | ||
45 | + <pricePlanName>R18NSB123</pricePlanName> | ||
46 | + <createdDate>2018-03-13 07-21-11</createdDate> | ||
47 | + <effDate>2018-03-13 07-21-11</effDate> | ||
48 | + <expDate></expDate> | ||
49 | + <pricePlanAttrDtoList/> | ||
50 | + </pricePlanDto> | ||
51 | + </pricePlanDtoList> | ||
52 | + <fellowISDNDtoList/> | ||
53 | + <state>A</state> | ||
54 | + <stateSet>00000000000000</stateSet> | ||
55 | + <balDtoList> | ||
56 | + <balDto> | ||
57 | + <acctResName>Calling_Bonus</acctResName> | ||
58 | + <acctResCode>2</acctResCode> | ||
59 | + <balance>0</balance> | ||
60 | + <effDate>2018-03-13 07-21-06</effDate> | ||
61 | + <expDate>2050-12-31 07-21-06</expDate> | ||
62 | + <reservedBalance>0</reservedBalance> | ||
63 | + </balDto> | ||
64 | + <balDto> | ||
65 | + <acctResName>Main Balance</acctResName> | ||
66 | + <acctResCode>0</acctResCode> | ||
67 | + <balance>278.165</balance> | ||
68 | + <effDate>2018-03-13 00-00-00</effDate> | ||
69 | + <expDate>2021-10-05 17-48-08</expDate> | ||
70 | + <reservedBalance>0</reservedBalance> | ||
71 | + </balDto> | ||
72 | + </balDtoList> | ||
73 | + <activeStopDate>2021-10-04</activeStopDate> | ||
74 | + <suspendStopDate>2021-11-03</suspendStopDate> | ||
75 | + <disableStopDate>2021-11-18</disableStopDate> | ||
76 | + <serviceStopDate>2117-03-12</serviceStopDate> | ||
77 | + <refillTempErrorTimes>0</refillTempErrorTimes> | ||
78 | + <refillErrorTimes>0</refillErrorTimes> | ||
79 | + <routingID>42</routingID> | ||
80 | + <lowerThreshold>20</lowerThreshold> | ||
81 | + <maxPerRefill>50000000</maxPerRefill> | ||
82 | + <refillAble>Y</refillAble> | ||
83 | + </queryUserProfileResM> | ||
84 | + <extResM/> | ||
85 | + </queryUserProfileRes> | ||
86 | + </ns2:processQueryUserProfileResponse> | ||
87 | + </S:Body> | ||
88 | + </S:Envelope> | ||
89 | + ` | ||
90 | + | ||
91 | + res.status(200).send(response) | ||
92 | +} | ||
93 | + | ||
94 | +module.exports.balance = async (req, res) => { | ||
95 | + console.log('===== POST balance =====') | ||
96 | + console.log('url', req.originalUrl); | ||
97 | + console.log('headers', req.headers); | ||
98 | + console.log('query', req.query); | ||
99 | + console.log('params', req.params); | ||
100 | + console.log('body', req.body); | ||
101 | + | ||
102 | + let response = `<?xml version='1.0' encoding='UTF-8'?> | ||
103 | + <S:Envelope | ||
104 | + xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> | ||
105 | + <S:Body> | ||
106 | + <ns2:processQryBalanceListResponse | ||
107 | + xmlns:ns2="http://qrybalancelist.ws.ccpgw.trueinfo.th/"> | ||
108 | + <qryBalanceListRes> | ||
109 | + <authReqM> | ||
110 | + <cpid>TRUCRM</cpid> | ||
111 | + <appid>0001</appid> | ||
112 | + <cpTransactionId>8f11f2a5-99be-4a19-b662-b75d9ae76fba</cpTransactionId> | ||
113 | + <gwTransactionId>GWTRUCRM000121081714S100863E5F</gwTransactionId> | ||
114 | + </authReqM> | ||
115 | + <resultResM> | ||
116 | + <result>0</result> | ||
117 | + <resultDesc>success</resultDesc> | ||
118 | + </resultResM> | ||
119 | + <qryBalanceListResM> | ||
120 | + <balDtoList> | ||
121 | + <balDto> | ||
122 | + <acctResName>Calling_Bonus</acctResName> | ||
123 | + <balanceID>8667338666</balanceID> | ||
124 | + <acctResCode>2</acctResCode> | ||
125 | + <balance>0</balance> | ||
126 | + <effDate>2018-03-13 07-21-06</effDate> | ||
127 | + <expDate>2050-12-31 07-21-06</expDate> | ||
128 | + <updateDate>2018-12-27 17-29-19</updateDate> | ||
129 | + <reservedBalance>0</reservedBalance> | ||
130 | + <comments>Baht</comments> | ||
131 | + </balDto> | ||
132 | + <balDto> | ||
133 | + <acctResName>Main Balance</acctResName> | ||
134 | + <balanceID>8667320378</balanceID> | ||
135 | + <acctResCode>0</acctResCode> | ||
136 | + <balance>278.165</balance> | ||
137 | + <effDate>2018-03-13 00-00-00</effDate> | ||
138 | + <expDate>2021-10-05 17-48-08</expDate> | ||
139 | + <updateDate>2021-05-25 20-10-01</updateDate> | ||
140 | + <reservedBalance>0</reservedBalance> | ||
141 | + <comments>Baht</comments> | ||
142 | + </balDto> | ||
143 | + <balDto> | ||
144 | + <acctResName>DB_OC_V_TVS</acctResName> | ||
145 | + <balanceID>8667320378</balanceID> | ||
146 | + <acctResCode>0</acctResCode> | ||
147 | + <balance>10248252</balance> | ||
148 | + <effDate>2018-03-13 00-00-00</effDate> | ||
149 | + <expDate>2021-10-05 17-48-08</expDate> | ||
150 | + <updateDate>2021-05-25 20-10-01</updateDate> | ||
151 | + <reservedBalance>0</reservedBalance> | ||
152 | + <comments>mb</comments> | ||
153 | + </balDto> | ||
154 | + <balDto> | ||
155 | + <acctResName>VB_OC_IPK_IDD_ASIAN</acctResName> | ||
156 | + <balanceID>8667320378</balanceID> | ||
157 | + <acctResCode>0</acctResCode> | ||
158 | + <balance>3600</balance> | ||
159 | + <effDate>2018-03-13 00-00-00</effDate> | ||
160 | + <expDate>2021-10-05 17-48-08</expDate> | ||
161 | + <updateDate>2021-05-25 20-10-01</updateDate> | ||
162 | + <reservedBalance>0</reservedBalance> | ||
163 | + <comments>hr</comments> | ||
164 | + </balDto> | ||
165 | + <balDto> | ||
166 | + <acctResName>AAAA</acctResName> | ||
167 | + <balanceID>8667320378</balanceID> | ||
168 | + <acctResCode>0</acctResCode> | ||
169 | + <balance>125</balance> | ||
170 | + <effDate>2018-03-13 00-00-00</effDate> | ||
171 | + <expDate>2021-10-05 17-48-08</expDate> | ||
172 | + <updateDate>2021-05-25 20-10-01</updateDate> | ||
173 | + <reservedBalance>0</reservedBalance> | ||
174 | + <comments>umit</comments> | ||
175 | + </balDto> | ||
176 | + </balDtoList> | ||
177 | + </qryBalanceListResM> | ||
178 | + <extResM/> | ||
179 | + </qryBalanceListRes> | ||
180 | + </ns2:processQryBalanceListResponse> | ||
181 | + </S:Body> | ||
182 | + </S:Envelope>` | ||
183 | + | ||
184 | + res.status(200).send(response) | ||
185 | +} | ||
0 | \ No newline at end of file | 186 | \ No newline at end of file |
int.js
@@ -592,3 +592,499 @@ module.exports.getBillImage = async (req, res) => { | @@ -592,3 +592,499 @@ module.exports.getBillImage = async (req, res) => { | ||
592 | 592 | ||
593 | res.status(200).send(response) | 593 | res.status(200).send(response) |
594 | } | 594 | } |
595 | + | ||
596 | +module.exports.getAdjustmentSummaryAmount = async (req, res) => { | ||
597 | + console.log('===== POST getAdjustmentSummaryAmount =====') | ||
598 | + console.log('url', req.originalUrl); | ||
599 | + console.log('headers', req.headers); | ||
600 | + console.log('query', req.query); | ||
601 | + console.log('params', req.params); | ||
602 | + console.log('body', JSON.stringify(req.body)); | ||
603 | + | ||
604 | + let responseErr = { | ||
605 | + "getAdjustmentSummaryAmountResponse": { | ||
606 | + "return": { | ||
607 | + "errorCode": "OSBbllngA10001", | ||
608 | + "message": "Error.", | ||
609 | + "uuid": "e6717ec3-944b-4221-8825-3d32cf84bf35" | ||
610 | + } | ||
611 | + } | ||
612 | + } | ||
613 | + | ||
614 | + let response = { | ||
615 | + "getAdjustmentSummaryAmountResponse": { | ||
616 | + "return": { | ||
617 | + "adjustmentSummaryAmountInfo": { | ||
618 | + "taxAmount": "31.45", | ||
619 | + "adjustmentAmount": "449.25" | ||
620 | + }, | ||
621 | + "errorCode": "OSBbllngA00001", | ||
622 | + "message": "Success.", | ||
623 | + "uuid": "e6717ec3-944b-4221-8825-3d32cf84bf35" | ||
624 | + } | ||
625 | + } | ||
626 | + } | ||
627 | + | ||
628 | + res.status(200).send(response) | ||
629 | +} | ||
630 | + | ||
631 | +module.exports.getAdjustmentHistoryList = async (req, res) => { | ||
632 | + console.log('===== POST getAdjustmentHistoryList =====') | ||
633 | + console.log('url', req.originalUrl); | ||
634 | + console.log('headers', req.headers); | ||
635 | + console.log('query', req.query); | ||
636 | + console.log('params', req.params); | ||
637 | + console.log('body', JSON.stringify(req.body)); | ||
638 | + | ||
639 | + let responseErr = { | ||
640 | + "getAdjustmentHistoryListResponse": { | ||
641 | + "return": { | ||
642 | + "errorCode": "OSBbllngA10001", | ||
643 | + "message": "Error.", | ||
644 | + "uuid": "e6717ec3-944b-4221-8825-3d32cf84bf35" | ||
645 | + } | ||
646 | + } | ||
647 | + } | ||
648 | + | ||
649 | + let response = { | ||
650 | + "getAdjustmentHistoryListResponse": { | ||
651 | + "return": { | ||
652 | + "totalSize": "7", | ||
653 | + "adjustmentList": { | ||
654 | + "size": "7", | ||
655 | + "adjustmentInfoArray": [ | ||
656 | + { | ||
657 | + "adjustmentAllocationList": { | ||
658 | + "size": "1", | ||
659 | + "adjustmentAllocationInfoArray": [ | ||
660 | + { | ||
661 | + "invoiceId": "1513968231", | ||
662 | + "invoiceNo": "010320211051308907", | ||
663 | + "allocatedCreditAmount": "480.7" | ||
664 | + } | ||
665 | + ] | ||
666 | + }, | ||
667 | + "totalAmount": "480.7", | ||
668 | + "amount": "449.25", | ||
669 | + "creditDate": "2021-04-08T00:00:00.000+07:00", | ||
670 | + "creditId": "775866320", | ||
671 | + "creditLevelCode": "DEB", | ||
672 | + "reversalReason": "", | ||
673 | + "creditReason": "CRMG01", | ||
674 | + "creditNoteNo": "CA-RM-2104036728", | ||
675 | + "taxAmount": "31.45", | ||
676 | + "userId": "2-372544013733:01028828", | ||
677 | + "memoText": "Wanidchaya Srihata" | ||
678 | + }, | ||
679 | + { | ||
680 | + "adjustmentAllocationList": { | ||
681 | + "size": "1", | ||
682 | + "adjustmentAllocationInfoArray": [ | ||
683 | + { | ||
684 | + "invoiceId": "1490481280", | ||
685 | + "invoiceNo": "010220211039639824", | ||
686 | + "allocatedCreditAmount": "640.93" | ||
687 | + } | ||
688 | + ] | ||
689 | + }, | ||
690 | + "totalAmount": "640.93", | ||
691 | + "amount": "599", | ||
692 | + "creditDate": "2021-04-08T00:00:00.000+07:00", | ||
693 | + "creditId": "776485485", | ||
694 | + "creditLevelCode": "DEB", | ||
695 | + "reversalReason": "", | ||
696 | + "creditReason": "CRMG01", | ||
697 | + "creditNoteNo": "CA-RM-2104036727", | ||
698 | + "taxAmount": "41.93", | ||
699 | + "userId": "2-372544013733:01028828", | ||
700 | + "memoText": "Wanidchaya Srihata" | ||
701 | + }, | ||
702 | + { | ||
703 | + "adjustmentAllocationList": { | ||
704 | + "size": "1", | ||
705 | + "adjustmentAllocationInfoArray": [ | ||
706 | + { | ||
707 | + "invoiceId": "1467304418", | ||
708 | + "invoiceNo": "010120211027964113", | ||
709 | + "allocatedCreditAmount": "640.93" | ||
710 | + } | ||
711 | + ] | ||
712 | + }, | ||
713 | + "totalAmount": "640.93", | ||
714 | + "amount": "599", | ||
715 | + "creditDate": "2021-04-08T00:00:00.000+07:00", | ||
716 | + "creditId": "776579004", | ||
717 | + "creditLevelCode": "DEB", | ||
718 | + "reversalReason": "", | ||
719 | + "creditReason": "CRMG01", | ||
720 | + "creditNoteNo": "CA-RM-2104036726", | ||
721 | + "taxAmount": "41.93", | ||
722 | + "userId": "2-372544013733:01028828", | ||
723 | + "memoText": "Wanidchaya Srihata" | ||
724 | + }, | ||
725 | + { | ||
726 | + "adjustmentAllocationList": { | ||
727 | + "size": "1", | ||
728 | + "adjustmentAllocationInfoArray": [ | ||
729 | + { | ||
730 | + "invoiceId": "1443542918", | ||
731 | + "invoiceNo": "011220201016331633", | ||
732 | + "allocatedCreditAmount": "640.93" | ||
733 | + } | ||
734 | + ] | ||
735 | + }, | ||
736 | + "totalAmount": "640.93", | ||
737 | + "amount": "599", | ||
738 | + "creditDate": "2021-04-08T00:00:00.000+07:00", | ||
739 | + "creditId": "776485484", | ||
740 | + "creditLevelCode": "DEB", | ||
741 | + "reversalReason": "", | ||
742 | + "creditReason": "CRMG01", | ||
743 | + "creditNoteNo": "CA-RM-2104036725", | ||
744 | + "taxAmount": "41.93", | ||
745 | + "userId": "2-372544013733:01028828", | ||
746 | + "memoText": "Wanidchaya Srihata" | ||
747 | + }, | ||
748 | + { | ||
749 | + "adjustmentAllocationList": { | ||
750 | + "size": "1", | ||
751 | + "adjustmentAllocationInfoArray": [ | ||
752 | + { | ||
753 | + "invoiceId": "1420401161", | ||
754 | + "invoiceNo": "011120201004647268", | ||
755 | + "allocatedCreditAmount": "640.93" | ||
756 | + } | ||
757 | + ] | ||
758 | + }, | ||
759 | + "totalAmount": "640.93", | ||
760 | + "amount": "599", | ||
761 | + "creditDate": "2021-04-08T00:00:00.000+07:00", | ||
762 | + "creditId": "775891146", | ||
763 | + "creditLevelCode": "DEB", | ||
764 | + "reversalReason": "", | ||
765 | + "creditReason": "CRMG01", | ||
766 | + "creditNoteNo": "CA-RM-2104036724", | ||
767 | + "taxAmount": "41.93", | ||
768 | + "userId": "2-372544013733:01028828", | ||
769 | + "memoText": "Wanidchaya Srihata" | ||
770 | + }, | ||
771 | + { | ||
772 | + "adjustmentAllocationList": { | ||
773 | + "size": "1", | ||
774 | + "adjustmentAllocationInfoArray": [ | ||
775 | + { | ||
776 | + "invoiceId": "1397327056", | ||
777 | + "invoiceNo": "011020201093071353", | ||
778 | + "allocatedCreditAmount": "400.58" | ||
779 | + } | ||
780 | + ] | ||
781 | + }, | ||
782 | + "totalAmount": "400.58", | ||
783 | + "amount": "374.37", | ||
784 | + "creditDate": "2021-04-08T00:00:00.000+07:00", | ||
785 | + "creditId": "776579003", | ||
786 | + "creditLevelCode": "DEB", | ||
787 | + "reversalReason": "", | ||
788 | + "creditReason": "CRMG01", | ||
789 | + "creditNoteNo": "CA-RM-2104036723", | ||
790 | + "taxAmount": "26.21", | ||
791 | + "userId": "2-372544013733:01028828", | ||
792 | + "memoText": "Wanidchaya Srihata" | ||
793 | + }, | ||
794 | + { | ||
795 | + "adjustmentAllocationList": { | ||
796 | + "size": "2", | ||
797 | + "adjustmentAllocationInfoArray": [ | ||
798 | + { | ||
799 | + "invoiceId": "43535305", | ||
800 | + "invoiceNo": "9082014105646265", | ||
801 | + "allocatedCreditAmount": "13.66" | ||
802 | + }, | ||
803 | + { | ||
804 | + "invoiceId": "0", | ||
805 | + "invoiceNo": "UNAPPLIED", | ||
806 | + "allocatedCreditAmount": "0" | ||
807 | + } | ||
808 | + ] | ||
809 | + }, | ||
810 | + "totalAmount": "13.66", | ||
811 | + "amount": "12.77", | ||
812 | + "creditDate": "2014-10-22T00:00:00.000+07:00", | ||
813 | + "creditId": "56014584", | ||
814 | + "creditLevelCode": "DEB", | ||
815 | + "reversalReason": "", | ||
816 | + "creditReason": "ECH001", | ||
817 | + "creditNoteNo": "CA-RM-1410019455", | ||
818 | + "taxAmount": "0.89", | ||
819 | + "userId": "417926", | ||
820 | + "memoText": "ADJ_SOC_4G_Error" | ||
821 | + } | ||
822 | + ] | ||
823 | + }, | ||
824 | + "calculatedPageSize": "100", | ||
825 | + "errorCode": "OSBbllngA00001", | ||
826 | + "message": "Success.", | ||
827 | + "uuid": "a4af56a7-9c80-4dc3-b31f-5ff93ba0277a" | ||
828 | + } | ||
829 | + } | ||
830 | + } | ||
831 | + | ||
832 | + res.status(200).send(response) | ||
833 | +} | ||
834 | + | ||
835 | +module.exports.getTdsList = async (req, res) => { | ||
836 | + console.log('===== POST getTdsList =====') | ||
837 | + console.log('url', req.originalUrl); | ||
838 | + console.log('headers', req.headers); | ||
839 | + console.log('query', req.query); | ||
840 | + console.log('params', req.params); | ||
841 | + console.log('body', JSON.stringify(req.body)); | ||
842 | + | ||
843 | + let responseErr = { | ||
844 | + "errorCode": "INT10002", | ||
845 | + "message": "Error.", | ||
846 | + } | ||
847 | + | ||
848 | + let response = { | ||
849 | + "uuid": "6487362b-b489-4d32-b345-afd094c64643", | ||
850 | + "errorCode": "INT00001", | ||
851 | + "message": "Success.", | ||
852 | + "backendResponseList": { | ||
853 | + "size": 5, | ||
854 | + "backendResponseInfoArray": [ | ||
855 | + { | ||
856 | + "apiName": "getTDSPrimaryKeyList", | ||
857 | + "errorCode": "INT00001", | ||
858 | + "message": "Success. [uuid=13d8b65c-1544-4925-9fe6-bc3b33bdf355, correlatedId=a2c574b0-2189-4d2d-ae64-069cf38c88f5, primResourceValue=0971310696]", | ||
859 | + "system": "INTX", | ||
860 | + "url": "http://apigw.intx.true.th/CCBSCommonInfo/CCBSCommonInfo/getTDSPrimaryKeyList" | ||
861 | + }, | ||
862 | + { | ||
863 | + "apiName": "OSB-GETACCOUNTINFO", | ||
864 | + "errorCode": "OSBbllngA00001", | ||
865 | + "message": "Success. [uuid=ae8340e1-18f0-43f4-a6a2-3c8fde30ab19, correlatedId=a2c574b0-2189-4d2d-ae64-069cf38c88f5, accountId=269208142]", | ||
866 | + "system": "OSB", | ||
867 | + "url": "http://apigw.intx.true.th/MGCustomerInfo/MGCustomerInfo/getAccountInfo" | ||
868 | + }, | ||
869 | + { | ||
870 | + "apiName": "OSB-GETOPENINVOICELIST", | ||
871 | + "errorCode": "OSBbllngA00001", | ||
872 | + "message": "Success. [uuid=269718da-b006-40d3-a943-71759b333c4f, correlatedId=a2c574b0-2189-4d2d-ae64-069cf38c88f5, accountId=269208142]", | ||
873 | + "system": "OSB", | ||
874 | + "url": "http://apigw.intx.true.th/MGCCBSInvoiceInfo/MGCCBSInvoiceInfo/getOpenInvoiceList/269208142/100/1/a2c574b0-2189-4d2d-ae64-069cf38c88f5" | ||
875 | + }, | ||
876 | + { | ||
877 | + "apiName": "OSB-GETPRODUCTINFO", | ||
878 | + "errorCode": "OSBbllngA00001", | ||
879 | + "message": "Success. [uuid=f4c305f7-a071-49a3-a327-e043578aa0bc, correlatedId=a2c574b0-2189-4d2d-ae64-069cf38c88f5, subscriberId=118001855]", | ||
880 | + "system": "OSB", | ||
881 | + "url": "http://apigw.intx.true.th/MGProductInfo/MGProductInfo/getProductInfo" | ||
882 | + }, | ||
883 | + { | ||
884 | + "apiName": "getCurrentContractList", | ||
885 | + "errorCode": "INT00001", | ||
886 | + "message": "Success. [uuid=0648b363-cfa8-4d4a-84f2-079f21224744, correlatedId=a2c574b0-2189-4d2d-ae64-069cf38c88f5, agreementId=86217634]", | ||
887 | + "system": "INTX", | ||
888 | + "url": "http://apigw.intx.true.th/MGContractInfo/NativeContractInfo/getCurrentContractListBySearchList" | ||
889 | + } | ||
890 | + ] | ||
891 | + }, | ||
892 | + "tdsList": { | ||
893 | + "size": 1, | ||
894 | + "tdsInfoArray": [ | ||
895 | + { | ||
896 | + "account": { | ||
897 | + "accountId": 269208142, | ||
898 | + "arBalance": 9510.0 | ||
899 | + }, | ||
900 | + "subscriber": { | ||
901 | + "subscriberId": 118001855, | ||
902 | + "subscriberType": "TH" | ||
903 | + }, | ||
904 | + "invoiceList": { | ||
905 | + "size": 1, | ||
906 | + "invoiceInfoArray": [ | ||
907 | + { | ||
908 | + "invoiceId": 1471215586, | ||
909 | + "baNo": 269208142, | ||
910 | + "invoiceBcBanId": null, | ||
911 | + "billSequenceNo": -1, | ||
912 | + "invoiceNo": "AR1471215586", | ||
913 | + "invoiceType": "IMCG", | ||
914 | + "invoiceStatus": "O", | ||
915 | + "coverageEndDate": null, | ||
916 | + "coverageStartDate": null, | ||
917 | + "dueDate": "2021-01-17T00:00:00.000+07:00", | ||
918 | + "billAmount": 9510.0, | ||
919 | + "unpaidAmount": 9510.0, | ||
920 | + "discountAmount": 0.0, | ||
921 | + "billTaxAmount": 0.0, | ||
922 | + "vatRate": 0.0, | ||
923 | + "invoiceCycle": { | ||
924 | + "code": 25, | ||
925 | + "month": 1, | ||
926 | + "year": 2021 | ||
927 | + } | ||
928 | + } | ||
929 | + ] | ||
930 | + } | ||
931 | + } | ||
932 | + ] | ||
933 | + }, | ||
934 | + "contractSummary": { | ||
935 | + "totalFee": 0.0, | ||
936 | + "agreementId": 86217634 | ||
937 | + } | ||
938 | + } | ||
939 | + | ||
940 | + res.status(201).send(response) | ||
941 | +} | ||
942 | + | ||
943 | +module.exports.getFinalChargeInfo = async (req, res) => { | ||
944 | + console.log('===== POST getTdsList =====') | ||
945 | + console.log('url', req.originalUrl); | ||
946 | + console.log('headers', req.headers); | ||
947 | + console.log('query', req.query); | ||
948 | + console.log('params', req.params); | ||
949 | + console.log('body', JSON.stringify(req.body)); | ||
950 | + | ||
951 | + let responseErr = { | ||
952 | + "errorCode": "OSBbllngA10002", | ||
953 | + "message": "Error.", | ||
954 | + } | ||
955 | + | ||
956 | + let response = { | ||
957 | + "errorCode": "OSBbllngA00001", | ||
958 | + "message": "Success.", | ||
959 | + "uuid": "3901b80c-10fa-4455-8242-6fb07fbb11c5", | ||
960 | + "backendResponseList": { | ||
961 | + "backendResponseInfoArray": [{ | ||
962 | + "apiName": "getPrimaryKeyInfoByActiveAndBusinessLine", | ||
963 | + "errorCode": "OSBbllngA00001", | ||
964 | + "message": "Success.", | ||
965 | + "system": "OSB", | ||
966 | + "url": "http://172.19.188.21:8080/ESB_Get_CustomerPreferenceInfo/Interfaces/Proxy/CommonPreferenceInfoPS" | ||
967 | + }, { | ||
968 | + "apiName": "validate-finalbill-resource", | ||
969 | + "errorCode": "OSBbllngA00001", | ||
970 | + "message": "Success.", | ||
971 | + "system": "CCB-BDV-CM", | ||
972 | + "url": "http://billsim.true.th/billsimulator/finalbill/validate/resource/" | ||
973 | + }, { | ||
974 | + "apiName": "calculate-finalbill-resource", | ||
975 | + "errorCode": "OSBbllngA00001", | ||
976 | + "message": "Success.", | ||
977 | + "system": "CCB-BDV-CM", | ||
978 | + "url": "http://billsim.true.th/billsimulator/finalbill/resource/" | ||
979 | + }, { | ||
980 | + "apiName": "l9GetCreditLimitWithPerformanceIndicators", | ||
981 | + "errorCode": "OSBbllngA00001", | ||
982 | + "message": "Success.", | ||
983 | + "system": "CCCSOA", | ||
984 | + "url": "http://172.19.136.104/BillingServiceIntegration/BalanceService" | ||
985 | + }, { | ||
986 | + "apiName": "getAccountCustomerPreferenceList", | ||
987 | + "errorCode": "OSBbllngA00001", | ||
988 | + "message": "Success.", | ||
989 | + "system": "OSB", | ||
990 | + "url": "http://172.19.188.21:8080/ESB_Get_CustomerPreferenceInfo/Interfaces/Proxy/CustomerPreferenceInfoPS" | ||
991 | + }], | ||
992 | + "size": 5 | ||
993 | + }, | ||
994 | + "accountId": 253213439, | ||
995 | + "accountSplitParam": null, | ||
996 | + "accountSplitParamForSplitPCN": null, | ||
997 | + "allowedFinalChargeIndicator": "Y", | ||
998 | + "arBalance": 11759.3, | ||
999 | + "arBalanceSplitPCN": null, | ||
1000 | + "billSIMNetAmount": 901.55, | ||
1001 | + "billSIMValidationIndicator": "Y", | ||
1002 | + "convergenceIndicator": null, | ||
1003 | + "creditAvailable": -7359.30, | ||
1004 | + "creditLimit": 4400.0, | ||
1005 | + "creditLimitForSplitPCN": null, | ||
1006 | + "creditLimitWaiver": "N", | ||
1007 | + "creditLimitWaiverExpDate": "1960-01-01T00:00:00.000+07:00", | ||
1008 | + "defaultCreditLimit": 1000.0, | ||
1009 | + "discount": 12, | ||
1010 | + "minPayCancel": 12660.85, | ||
1011 | + "minPayCancelCalculationInfo": { | ||
1012 | + "fieldInfoArray": [{ | ||
1013 | + "name": "billSIMNetAmount", | ||
1014 | + "value": "901.55" | ||
1015 | + }, { | ||
1016 | + "name": "totalObligation", | ||
1017 | + "value": "11759.30" | ||
1018 | + }] | ||
1019 | + }, | ||
1020 | + "minpay": 11759.30, | ||
1021 | + "minpayCreditLimit": 8239.3, | ||
1022 | + "pendingRCOC": 0, | ||
1023 | + "proratedRC": 901.55, | ||
1024 | + "splitPCN": null, | ||
1025 | + "totalObligation": 11759.3, | ||
1026 | + "totalObligationForSplitPCN": null, | ||
1027 | + "unbilledUsage": 0 | ||
1028 | + } | ||
1029 | + | ||
1030 | + res.status(200).send(response) | ||
1031 | +} | ||
1032 | + | ||
1033 | +module.exports.getPayChannel = async (req, res) => { | ||
1034 | + console.log('===== GET getPayChannel =====') | ||
1035 | + console.log('url', req.originalUrl); | ||
1036 | + console.log('headers', req.headers); | ||
1037 | + console.log('query', req.query); | ||
1038 | + console.log('params', req.params); | ||
1039 | + console.log('body', JSON.stringify(req.body)); | ||
1040 | + | ||
1041 | + let responseErr = { | ||
1042 | + "getPayChannelInfoResponse": { | ||
1043 | + "return": { | ||
1044 | + "errorCode": "OSBbllngA00001", | ||
1045 | + "message": "Success.", | ||
1046 | + "uuid": "c8f2d372-1ba2-49d7-9c8a-830a44af9977" | ||
1047 | + } | ||
1048 | + } | ||
1049 | + } | ||
1050 | + | ||
1051 | + let response = { | ||
1052 | + "getPayChannelInfoResponse": { | ||
1053 | + "return": { | ||
1054 | + "errorCode": "OSBbllngA00001", | ||
1055 | + "payChannelInfo": { | ||
1056 | + "statusDate": "2019-03-27T00:00:00.000+07:00", | ||
1057 | + "billingArrangementId": "200078606", | ||
1058 | + "recurringFrequency": "", | ||
1059 | + "creditCardNo": "", | ||
1060 | + "recurringFrequencyValue": "", | ||
1061 | + "bankBranchName": "", | ||
1062 | + "bankAccountNo": "", | ||
1063 | + "bankName": "", | ||
1064 | + "creditCardType": "", | ||
1065 | + "payChannelStatus": "O", | ||
1066 | + "paymentType": "N", | ||
1067 | + "customerId": "187374", | ||
1068 | + "ddApprovalDate": "", | ||
1069 | + "bankCode": "", | ||
1070 | + "creditCardExpirationDate": "", | ||
1071 | + "recurringAmount": "", | ||
1072 | + "paymentCategory": "POST", | ||
1073 | + "paymentMeansOwnerDetails": "คุณ สัปปะรด ผลไม้", | ||
1074 | + "businessEntityId": "0", | ||
1075 | + "paymentMethodDesc": "Cash Payment", | ||
1076 | + "bankAccountType": "", | ||
1077 | + "payChannelNo": "200078606", | ||
1078 | + "bankBranchNo": "", | ||
1079 | + "billingArrangementNo": "1", | ||
1080 | + "paymentMethod": "CA", | ||
1081 | + "openDate": "2019-03-27T00:00:00.000+07:00" | ||
1082 | + }, | ||
1083 | + "message": "Success.", | ||
1084 | + "uuid": "c8f2d372-1ba2-49d7-9c8a-830a44af9977" | ||
1085 | + } | ||
1086 | + } | ||
1087 | + } | ||
1088 | + | ||
1089 | + res.status(200).send(response) | ||
1090 | +} | ||
595 | \ No newline at end of file | 1091 | \ No newline at end of file |
intx.js
@@ -30,7 +30,7 @@ module.exports.getAllCCBSInvoiceList = async (req, res) => { | @@ -30,7 +30,7 @@ module.exports.getAllCCBSInvoiceList = async (req, res) => { | ||
30 | "dueDate": "2021-06-03T00:00:00.000+07:00", | 30 | "dueDate": "2021-06-03T00:00:00.000+07:00", |
31 | "orderIdGroup": "", | 31 | "orderIdGroup": "", |
32 | "vatRate": "0.00", | 32 | "vatRate": "0.00", |
33 | - "converageEndDate": "2021-06-09T00:00:00.000+07:00", | 33 | + "converageEndDate1": "2021-06-09T00:00:00.000+07:00", |
34 | "discountAmount": "-2000", | 34 | "discountAmount": "-2000", |
35 | "invoiceTFaxAmount": "76.93", | 35 | "invoiceTFaxAmount": "76.93", |
36 | "invoiceAmount": "1099", | 36 | "invoiceAmount": "1099", |
@@ -44,7 +44,7 @@ module.exports.getAllCCBSInvoiceList = async (req, res) => { | @@ -44,7 +44,7 @@ module.exports.getAllCCBSInvoiceList = async (req, res) => { | ||
44 | }, | 44 | }, |
45 | "billAmount": "4703.72", | 45 | "billAmount": "4703.72", |
46 | "invoiceType": "BILL", | 46 | "invoiceType": "BILL", |
47 | - "converageStartDate": "2021-05-10T00:00:00.000+07:00", | 47 | + "converageStartDate1": "2021-05-10T00:00:00.000+07:00", |
48 | "currency": "THB", | 48 | "currency": "THB", |
49 | "billSequenceNo": "13522", | 49 | "billSequenceNo": "13522", |
50 | "invoiceNo": "070520211000425014", | 50 | "invoiceNo": "070520211000425014", |
@@ -1841,4 +1841,233 @@ module.exports.getPaymentList = async (req, res) => { | @@ -1841,4 +1841,233 @@ module.exports.getPaymentList = async (req, res) => { | ||
1841 | } | 1841 | } |
1842 | 1842 | ||
1843 | res.status(200).send(response) | 1843 | res.status(200).send(response) |
1844 | +} | ||
1845 | + | ||
1846 | +module.exports.getCurrentContractList = async (req, res) => { | ||
1847 | + console.log('===== GET getCurrentContractList =====') | ||
1848 | + console.log('url', req.originalUrl); | ||
1849 | + console.log('headers', req.headers); | ||
1850 | + console.log('query', req.query); | ||
1851 | + console.log('params', req.params); | ||
1852 | + console.log('body', req.body); | ||
1853 | + | ||
1854 | + let responseErr = { | ||
1855 | + "getCurrentContractListResponse": { | ||
1856 | + "return": { | ||
1857 | + "uuid": "ed41f948-565c-4900-a94d-ee63100e2fa4", | ||
1858 | + "errorCode": "OSBbllngA10001", | ||
1859 | + "message": "error." | ||
1860 | + } | ||
1861 | + } | ||
1862 | + } | ||
1863 | + | ||
1864 | + let response = { | ||
1865 | + "getCurrentContractListResponse":{ | ||
1866 | + "return":{ | ||
1867 | + "uuid":"b6cbfdb6-3e49-456a-b48d-c9ec84a067ab", | ||
1868 | + "errorCode":"OSBbllngA00001", | ||
1869 | + "message":"Success.", | ||
1870 | + "contractList":{ | ||
1871 | + "contractInfoArray":[ | ||
1872 | + { | ||
1873 | + "terminationDate":"2021-11-11T00:00:00.000+07:00", | ||
1874 | + "offerServiceLevel":"C", | ||
1875 | + "contractExpirationDate":"2021-11-11T00:00:00.000+07:00", | ||
1876 | + "offerInstanceId":"1669289", | ||
1877 | + "contractStartDate":"2020-11-11T00:00:00.000+07:00", | ||
1878 | + "offerCode":"14060327", | ||
1879 | + "fee":"0", | ||
1880 | + "proposition":{ | ||
1881 | + "code":"RMVC00000001586", | ||
1882 | + "description":"SH_Campus_iPad Air 3 64GB 256GB_d3000_a1605_c12" | ||
1883 | + }, | ||
1884 | + "contractGroupCode":null, | ||
1885 | + "contractGroupDescriptionThai":null, | ||
1886 | + "contractGroupDescriptionEng":null, | ||
1887 | + "contractNumber":"0830011853", | ||
1888 | + "remark":"TEST Update Fee=0 for overdue customer after penalty charged on 11/11/2020", | ||
1889 | + "term":"12", | ||
1890 | + "effectiveDate":"2020-11-11T10:46:09.000+07:00" | ||
1891 | + }, | ||
1892 | + { | ||
1893 | + "terminationDate":"2021-12-04T00:00:00.000+07:00", | ||
1894 | + "offerServiceLevel":"C", | ||
1895 | + "contractExpirationDate":"2021-12-04T00:00:00.000+07:00", | ||
1896 | + "offerInstanceId":"1685138", | ||
1897 | + "contractStartDate":"2020-12-04T00:00:00.000+07:00", | ||
1898 | + "offerCode":"15001717", | ||
1899 | + "fee":"5090", | ||
1900 | + "proposition":{ | ||
1901 | + "code":"RMV000000003554", | ||
1902 | + "description":"MG_S_4G Value_TS Tab 4G M1_Adv1000_Disc5090_C12_AT" | ||
1903 | + }, | ||
1904 | + "contractGroupCode":null, | ||
1905 | + "contractGroupDescriptionThai":null, | ||
1906 | + "contractGroupDescriptionEng":null, | ||
1907 | + "contractNumber":"0830011853", | ||
1908 | + "remark":"Add Contract", | ||
1909 | + "term":"12", | ||
1910 | + "effectiveDate":"2020-12-04T10:11:13.000+07:00" | ||
1911 | + } | ||
1912 | + ], | ||
1913 | + "size":"2" | ||
1914 | + } | ||
1915 | + } | ||
1916 | + } | ||
1917 | + } | ||
1918 | + | ||
1919 | + res.status(200).send(response) | ||
1920 | +} | ||
1921 | + | ||
1922 | +module.exports.getAccountInfo = async (req, res) => { | ||
1923 | + console.log('===== GET getAccountInfo =====') | ||
1924 | + console.log('url', req.originalUrl); | ||
1925 | + console.log('headers', req.headers); | ||
1926 | + console.log('query', req.query); | ||
1927 | + console.log('params', req.params); | ||
1928 | + console.log('body', req.body); | ||
1929 | + | ||
1930 | + let responseErr = { | ||
1931 | + "getAccountInfoResponse": { | ||
1932 | + "return": { | ||
1933 | + "uuid": "ed41f948-565c-4900-a94d-ee63100e2fa4", | ||
1934 | + "errorCode": "OSBbllngA10001", | ||
1935 | + "message": "error." | ||
1936 | + } | ||
1937 | + } | ||
1938 | + } | ||
1939 | + | ||
1940 | + let response = { | ||
1941 | + "getAccountInfoResponse": { | ||
1942 | + "return": { | ||
1943 | + "uuid": "c521b8c0-e810-4467-b3ca-e1be3e274a1a", | ||
1944 | + "errorCode": "OSBbllngA00001", | ||
1945 | + "message": "Success.", | ||
1946 | + "account": { | ||
1947 | + "accountCollection": { | ||
1948 | + "collectionIndicator": null, | ||
1949 | + "suspensionReason": null, | ||
1950 | + "fullSuspensionIndicator": null, | ||
1951 | + "punishmentLevels": null, | ||
1952 | + "startDate": null, | ||
1953 | + "status": "NONE", | ||
1954 | + "collectionTreatmentIndicator": "N" | ||
1955 | + }, | ||
1956 | + "classify": "R", | ||
1957 | + "accountSubType": { | ||
1958 | + "code": "RES", | ||
1959 | + "description": "Individual - Residential" | ||
1960 | + }, | ||
1961 | + "ben": { | ||
1962 | + "consolidateIndicator": "Y", | ||
1963 | + "billLanguage": "TH", | ||
1964 | + "ben": "200078606", | ||
1965 | + "bcBanId": "700046423", | ||
1966 | + "billMedia": "S", | ||
1967 | + "status": { | ||
1968 | + "code": "O", | ||
1969 | + "description": "Open" | ||
1970 | + } | ||
1971 | + }, | ||
1972 | + "legacyBan": null, | ||
1973 | + "exernalId": null, | ||
1974 | + "ouId": "115614", | ||
1975 | + "delinquent": "", | ||
1976 | + "contact": { | ||
1977 | + "preferredContactNo": "0909230076", | ||
1978 | + "officePhone": null, | ||
1979 | + "homePhone": "0924971811", | ||
1980 | + "language": "TH", | ||
1981 | + "privatePhone": null, | ||
1982 | + "fax": null, | ||
1983 | + "email": null | ||
1984 | + }, | ||
1985 | + "agreementId": "1344349", | ||
1986 | + "customerId": "187374", | ||
1987 | + "creditLimit": { | ||
1988 | + "creditClass": "X", | ||
1989 | + "creditLimitReasonCode": "CREQ", | ||
1990 | + "personalCreditLimit": "0.0", | ||
1991 | + "creditLimitExpirationDate": null, | ||
1992 | + "temporaryCreditLimit": "0.0", | ||
1993 | + "obligationCalculationFormula": "Formula 3" | ||
1994 | + }, | ||
1995 | + "company": { | ||
1996 | + "code": "TI", | ||
1997 | + "description": "True Internet Corporation Company Limited" | ||
1998 | + }, | ||
1999 | + "arBalance": "28471.34", | ||
2000 | + "accountPriority": null, | ||
2001 | + "address": { | ||
2002 | + "country": null, | ||
2003 | + "zipCode": "50200", | ||
2004 | + "roomNo": "-", | ||
2005 | + "city": "เชียงใหม่", | ||
2006 | + "addressType": "I", | ||
2007 | + "moo": "1", | ||
2008 | + "soi": "-", | ||
2009 | + "building": "UNI LOFT CHAINGMAI D", | ||
2010 | + "sinceDate": null, | ||
2011 | + "street": "-", | ||
2012 | + "district": "เมืองเชียงใหม่", | ||
2013 | + "addressLine1": "137 * 1 * - *", | ||
2014 | + "houseNo": "137", | ||
2015 | + "addressLine2": "* UNI LOFT CHAINGMAI D * - * - * -", | ||
2016 | + "addressLine3": "* สุเทพ * เมืองเชียงใหม่", | ||
2017 | + "addressLine4": "เชียงใหม่ 50200", | ||
2018 | + "floor": "-", | ||
2019 | + "subDistrict": "สุเทพ" | ||
2020 | + }, | ||
2021 | + "parentBan": null, | ||
2022 | + "initiationReason": null, | ||
2023 | + "creditStatus": { | ||
2024 | + "reasonDescription": null, | ||
2025 | + "lastActivityDate": null, | ||
2026 | + "reasonCode": null, | ||
2027 | + "status": "NONE" | ||
2028 | + }, | ||
2029 | + "convergenceCode": "4PPremium", | ||
2030 | + "accountId": "200078606", | ||
2031 | + "statusDescription": "Active", | ||
2032 | + "collectionStatus": { | ||
2033 | + "reasonDescription": null, | ||
2034 | + "lastActivityDate": null, | ||
2035 | + "reasonCode": null, | ||
2036 | + "status": "NONE" | ||
2037 | + }, | ||
2038 | + "taxId": "7175358721530", | ||
2039 | + "withholdingTaxUpdateDate": null, | ||
2040 | + "withholdingTaxIndicator": "N", | ||
2041 | + "name": { | ||
2042 | + "branchCode": null, | ||
2043 | + "nameType": "I", | ||
2044 | + "firstName": "สัปปะรด", | ||
2045 | + "lastName": "ผลไม้", | ||
2046 | + "organizationName": null, | ||
2047 | + "branchName": null, | ||
2048 | + "middleName": null, | ||
2049 | + "storeId": null, | ||
2050 | + "tilte": "คุณ" | ||
2051 | + }, | ||
2052 | + "openDate": "2019-03-27T00:00:00.000+07:00", | ||
2053 | + "branchNo": "00000", | ||
2054 | + "partnerCode": null, | ||
2055 | + "businessLine": null, | ||
2056 | + "penaltyPayment": { | ||
2057 | + "creditCardType": null, | ||
2058 | + "creditCardNumber": null, | ||
2059 | + "creditCardName": null, | ||
2060 | + "creditCardExpirationDate": null, | ||
2061 | + "bankCode": null, | ||
2062 | + "bankBranchNumber": null, | ||
2063 | + "bankAccountNumber": null, | ||
2064 | + "penaltyPaymentType": "ASCENDLOAN" | ||
2065 | + }, | ||
2066 | + "interestWaivingIndicator": "N" | ||
2067 | + } | ||
2068 | + } | ||
2069 | + } | ||
2070 | + } | ||
2071 | + | ||
2072 | + res.status(200).send(response) | ||
1844 | } | 2073 | } |
1845 | \ No newline at end of file | 2074 | \ No newline at end of file |
@@ -0,0 +1,305 @@ | @@ -0,0 +1,305 @@ | ||
1 | + | ||
2 | + | ||
3 | + | ||
4 | +test = { | ||
5 | + "getAccountCustomerInfoResponse": { | ||
6 | + "return": { | ||
7 | + "withholdingTaxRate": "3", | ||
8 | + "errorCode": "OSBbllngA00001", | ||
9 | + "type": "ax21:AccountCustomerInfoResponse", | ||
10 | + "message": "Success.", | ||
11 | + "uuid": "4b8541d3-e6b4-44c3-8291-8688e5dc72cc", | ||
12 | + "account": { | ||
13 | + "accountCollection": { | ||
14 | + "collectionIndicator": "", | ||
15 | + "suspensionReason": "", | ||
16 | + "fullSuspensionIndicator": "", | ||
17 | + "punishmentLevels": "", | ||
18 | + "startDate": { | ||
19 | + "nil": true | ||
20 | + }, | ||
21 | + "status": "NONE" | ||
22 | + }, | ||
23 | + "classify": "R", | ||
24 | + "accountSubType": { | ||
25 | + "code": "EVP", | ||
26 | + "description": "Enterprise VIP" | ||
27 | + }, | ||
28 | + "ben": { | ||
29 | + "consolidateIndicator": "N", | ||
30 | + "billLanguage": "TH", | ||
31 | + "ben": "10000787", | ||
32 | + "bcBanId": "1465", | ||
33 | + "billMedia": "P", | ||
34 | + "status": { | ||
35 | + "code": "O", | ||
36 | + "description": "Open" | ||
37 | + } | ||
38 | + }, | ||
39 | + "type": "ax24:AccountInfo", | ||
40 | + "legacyBan": "", | ||
41 | + "exernalId": "", | ||
42 | + "ouId": "1282", | ||
43 | + "delinquent": "", | ||
44 | + "contact": { | ||
45 | + "preferredContactNo": "*", | ||
46 | + "officePhone": "", | ||
47 | + "homePhone": "023345678", | ||
48 | + "language": "TH", | ||
49 | + "privatePhone": "", | ||
50 | + "fax": "", | ||
51 | + "email": "" | ||
52 | + }, | ||
53 | + "agreementId": "1820", | ||
54 | + "customerId": "2456", | ||
55 | + "creditLimit": { | ||
56 | + "creditClass": "BV", | ||
57 | + "creditLimitReasonCode": "CREQ", | ||
58 | + "personalCreditLimit": "1000.0", | ||
59 | + "creditLimitExpirationDate": { | ||
60 | + "nil": true | ||
61 | + }, | ||
62 | + "temporaryCreditLimit": "0.0", | ||
63 | + "obligationCalculationFormula": "Formula 2" | ||
64 | + }, | ||
65 | + "company": { | ||
66 | + "code": "RF", | ||
67 | + "description": "True Move H Universal Communication Co., Ltd" | ||
68 | + }, | ||
69 | + "arBalance": "853.86", | ||
70 | + "accountPriority": "", | ||
71 | + "address": { | ||
72 | + "country": "", | ||
73 | + "zipCode": "10540", | ||
74 | + "roomNo": "", | ||
75 | + "city": "สมุทรปราการ", | ||
76 | + "addressType": "B", | ||
77 | + "moo": "", | ||
78 | + "soi": "", | ||
79 | + "building": "", | ||
80 | + "street": "บางพลีน้อย", | ||
81 | + "district": "บางพลี", | ||
82 | + "addressLine1": "13 * *", | ||
83 | + "houseNo": "13", | ||
84 | + "addressLine2": "* * * * บางพลีน้อย", | ||
85 | + "addressLine3": "* บางปลา * บางพลี", | ||
86 | + "addressLine4": "สมุทรปราการ 10540", | ||
87 | + "floor": "", | ||
88 | + "subDistrict": "บางปลา" | ||
89 | + }, | ||
90 | + "parentBan": { | ||
91 | + "nil": true | ||
92 | + }, | ||
93 | + "initiationReason": { | ||
94 | + "nil": true | ||
95 | + }, | ||
96 | + "creditStatus": { | ||
97 | + "reasonDescription": "", | ||
98 | + "lastActivityDate": { | ||
99 | + "nil": true | ||
100 | + }, | ||
101 | + "reasonCode": "", | ||
102 | + "status": "NONE" | ||
103 | + }, | ||
104 | + "convergenceCode": "", | ||
105 | + "accountId": "10000787", | ||
106 | + "statusDescription": "Active", | ||
107 | + "collectionStatus": { | ||
108 | + "reasonDescription": "", | ||
109 | + "lastActivityDate": null, | ||
110 | + "reasonCode": "", | ||
111 | + "status": "NONE" | ||
112 | + }, | ||
113 | + "taxId": "", | ||
114 | + "withholdingTaxUpdateDate": { | ||
115 | + "nil": true | ||
116 | + }, | ||
117 | + "withholdingTaxIndicator": "N", | ||
118 | + "name": { | ||
119 | + "branchCode": "", | ||
120 | + "nameType": "B", | ||
121 | + "firstName": "", | ||
122 | + "lastName": "", | ||
123 | + "organizationName": "มหาวิทยาลัยหอการค้าไทย", | ||
124 | + "branchName": "", | ||
125 | + "middleName": "", | ||
126 | + "storeId": "", | ||
127 | + "tilte": "" | ||
128 | + }, | ||
129 | + "openDate": "2013-03-02T11:32:16.000+07:00", | ||
130 | + "branchNo": "" | ||
131 | + }, | ||
132 | + "customer": { | ||
133 | + "creditLimitIndicator": "N", | ||
134 | + "income": "", | ||
135 | + "timeInBusiness": "1311", | ||
136 | + "occupation": "", | ||
137 | + "type": "ax24:CustomerInfo", | ||
138 | + "customerType": { | ||
139 | + "code": "C", | ||
140 | + "description": "Corporate" | ||
141 | + }, | ||
142 | + "exernalId": "", | ||
143 | + "lastActivityCode": "NEW_ACCOUNT", | ||
144 | + "contactLanguage": "TH", | ||
145 | + "educationLevel": "", | ||
146 | + "contact": { | ||
147 | + "preferredContactNo": "", | ||
148 | + "officePhone": "", | ||
149 | + "homePhone": "023345678", | ||
150 | + "language": "TH", | ||
151 | + "privatePhone": "", | ||
152 | + "fax": "", | ||
153 | + "email": "" | ||
154 | + }, | ||
155 | + "customerId": "2456", | ||
156 | + "trueCardGrading": { | ||
157 | + "nil": true | ||
158 | + }, | ||
159 | + "certificateExpirationDate": "2014-12-31", | ||
160 | + "marketingChannel": "", | ||
161 | + "offerCurrency": "THB", | ||
162 | + "expirationDate": { | ||
163 | + "nil": true | ||
164 | + }, | ||
165 | + "registerDate": "2013-03-02T11:32:13.000+07:00", | ||
166 | + "creditClass": "BX", | ||
167 | + "address": { | ||
168 | + "country": "", | ||
169 | + "zipCode": "10540", | ||
170 | + "roomNo": "", | ||
171 | + "city": "สมุทรปราการ", | ||
172 | + "addressType": "B", | ||
173 | + "moo": "", | ||
174 | + "soi": "", | ||
175 | + "building": "", | ||
176 | + "sinceDate": "2013-03-02T11:32:13+07:00", | ||
177 | + "street": "บางพลีน้อย", | ||
178 | + "district": "บางพลี", | ||
179 | + "addressLine1": "13 * *", | ||
180 | + "houseNo": "13", | ||
181 | + "addressLine2": "* * * * บางพลีน้อย", | ||
182 | + "addressLine3": "* บางปลา * บางพลี", | ||
183 | + "addressLine4": "สมุทรปราการ 10540", | ||
184 | + "floor": "", | ||
185 | + "subDistrict": "บางปลา" | ||
186 | + }, | ||
187 | + "totalProduct": "1", | ||
188 | + "personal": { | ||
189 | + "gender": "", | ||
190 | + "accommodation": { | ||
191 | + "nil": true | ||
192 | + }, | ||
193 | + "maritalStatus": "" | ||
194 | + }, | ||
195 | + "birthDate": "1987-11-30", | ||
196 | + "lastActivityReasonCode": "CREQ", | ||
197 | + "nationality": "", | ||
198 | + "certificateNumber": "337/2515", | ||
199 | + "largeCustomerIndicator": "N", | ||
200 | + "periodOfWork": { | ||
201 | + "nil": true | ||
202 | + }, | ||
203 | + "billCycleInfo": { | ||
204 | + "changeCycleRequestStatus": "N", | ||
205 | + "newBillCycle": { | ||
206 | + "nil": true | ||
207 | + }, | ||
208 | + "changeCycleReqeustDate": { | ||
209 | + "nil": true | ||
210 | + }, | ||
211 | + "billCycle": { | ||
212 | + "code": "2", | ||
213 | + "description": "Monthly Cycle close on the 1" | ||
214 | + }, | ||
215 | + "changeCycleIndicator": "N" | ||
216 | + }, | ||
217 | + "dealer": { | ||
218 | + "code": "90225773", | ||
219 | + "description": "คุณจรรจิรา จรรยาลิขิต" | ||
220 | + }, | ||
221 | + "name": { | ||
222 | + "branchCode": "", | ||
223 | + "nameType": "B", | ||
224 | + "firstName": "", | ||
225 | + "lastName": "", | ||
226 | + "organizationName": "มหาวิทยาลัยหอการค้าไทย", | ||
227 | + "branchName": "", | ||
228 | + "middleName": "", | ||
229 | + "storeId": "", | ||
230 | + "tilte": "" | ||
231 | + }, | ||
232 | + "customerGrading": "TOP", | ||
233 | + "taxExemptionIndicator": "N", | ||
234 | + "job": "", | ||
235 | + "effectiveDate": "2013-03-02T11:32:16.000+07:00", | ||
236 | + "certificateType": "O" | ||
237 | + } | ||
238 | + } | ||
239 | + } | ||
240 | + } | ||
241 | + | ||
242 | + | ||
243 | +creditDate = getAccountCustomerInfoResponse.return.account.creditStatus.lastActivityDate // string | ||
244 | +collectDate = getAccountCustomerInfoResponse.return.account.collectionStatus.lastActivityDate // string | ||
245 | +creditStatus = getAccountCustomerInfoResponse.return.account.creditStatus.status // string | ||
246 | +collectStatus = getAccountCustomerInfoResponse.return.account.collectionStatus.status // string | ||
247 | + | ||
248 | +if("NONE".equals(creditStatus) && "NONE".equals(collectStatus)){ | ||
249 | + if(CheckNullUtil.chkStringNotNull(creditDate) && CheckNullUtil.chkStringNotNull(collectDate)){ | ||
250 | + banStatusUpdated = compareDate("yyyy-MM-dd'T'HH:mm:ss.SSS",creditDate,collectDate); | ||
251 | + }else{ | ||
252 | + if(CheckNullUtil.chkStringNotNull(creditDate)){ | ||
253 | + banStatusUpdated = creditDate; | ||
254 | + }else if(CheckNullUtil.chkStringNotNull(collectDate)){ | ||
255 | + banStatusUpdated = collectDate; | ||
256 | + }else{ | ||
257 | + banStatusUpdated = accountMResult.getOpenDate(); | ||
258 | + } | ||
259 | + } | ||
260 | +}else if("NONE".equals(creditStatus)&&"PSUS".equals(collectStatus)){ | ||
261 | + banStatusUpdated = collectionStatusBean.getLastActivityDateStr(); | ||
262 | +}else if("NONE".equals(creditStatus)&&"SUS".equals(collectStatus)){ | ||
263 | + banStatusUpdated = collectionStatusBean.getLastActivityDateStr(); | ||
264 | +}else if("NONE".equals(creditStatus)&&"CAN".equals(collectStatus)){ | ||
265 | + banStatusUpdated = collectionStatusBean.getLastActivityDateStr(); | ||
266 | +}else if("PSUS".equals(creditStatus)&&"NONE".equals(collectStatus)){ | ||
267 | + banStatusUpdated = creditStatusBean.getLastActivityDateStr(); | ||
268 | +}else if("PSUS".equals(creditStatus)&&"PSUS".equals(collectStatus)){ | ||
269 | + banStatusUpdated = compareDate("yyyy-MM-dd'T'HH:mm:ss.SSS",creditDate,collectDate); | ||
270 | +}else if("PSUS".equals(creditStatus)&&"SUS".equals(collectStatus)){ | ||
271 | + banStatusUpdated = collectionStatusBean.getLastActivityDateStr(); | ||
272 | +}else if("PSUS".equals(creditStatus)&&"CAN".equals(collectStatus)){ | ||
273 | + banStatusUpdated = collectionStatusBean.getLastActivityDateStr(); | ||
274 | +} | ||
275 | + | ||
276 | + | ||
277 | + | ||
278 | +private String compareDate(String format,String dateStr1,String dateStr2) throws ParseException { | ||
279 | + String result = null; | ||
280 | + SimpleDateFormat sdf = new SimpleDateFormat(format); | ||
281 | + Date date1 = sdf.parse(dateStr1.substring(0,dateStr1.indexOf('+'))); | ||
282 | + Date date2 = sdf.parse(dateStr2.substring(0,dateStr2.indexOf('+'))); | ||
283 | + if (date1.after(date2)) { | ||
284 | + result = dateStr1; | ||
285 | + } | ||
286 | + if (date1.before(date2)) { | ||
287 | + result = dateStr2; | ||
288 | + } | ||
289 | + if (date1.equals(date2)) { | ||
290 | + result = dateStr1; | ||
291 | + } | ||
292 | + return result; | ||
293 | + } | ||
294 | + | ||
295 | + | ||
296 | + ----------------------------------------------------------------------------------------------------------------------------------- | ||
297 | + | ||
298 | + | ||
299 | + if (jsoncreditStatus.get("lastActivityDate").toString().equals("{\"nil\":true}") | ||
300 | + ||jsoncreditStatus.get("lastActivityDate").toString().equals("")) { | ||
301 | + tmpBanStatus.setCreditLimitDate(""); | ||
302 | + } | ||
303 | + else { | ||
304 | + tmpBanStatus.setCreditLimitDate(sdf2.format(sdf.parse(jsoncreditStatus.get("lastActivityDate").toString()))); | ||
305 | + } | ||
0 | \ No newline at end of file | 306 | \ No newline at end of file |
@@ -0,0 +1,372 @@ | @@ -0,0 +1,372 @@ | ||
1 | + | ||
2 | + | ||
3 | +ResultList = Envelope.Body.getProductHistoryListResponse.return.productHistoryList | ||
4 | + | ||
5 | +for(result in ResultList) { | ||
6 | + | ||
7 | + StatusCode = result.subscriberStatusHistoryInfoArray.status.statusCode | ||
8 | + Activity = result.subscriberStatusHistoryInfoArray.status.lastActivityPathId | ||
9 | + StatusReasonCode = result.subscriberStatusHistoryInfoArray.status.statusReasonCode | ||
10 | + StatusReasonDescription = result.subscriberStatusHistoryInfoArray.status.statusReasonDescription | ||
11 | + Since = result.subscriberStatusHistoryInfoArray.effectiveDate | ||
12 | + PreviousSubscriber = result.subscriberStatusHistoryInfoArray.linkPrevProductId | ||
13 | + NextSubscriber = result.subscriberStatusHistoryInfoArray.linkNextProductId | ||
14 | + CreditLimitStatus = result.subscriberStatusHistoryInfoArray.creditStatus.status | ||
15 | + CreditReasonCode = result.subscriberStatusHistoryInfoArray.creditStatus.reasonCode | ||
16 | + CreditReasonDescription = result.subscriberStatusHistoryInfoArray.creditStatus.reasonDescription | ||
17 | + CreditLimitActivityDate = result.subscriberStatusHistoryInfoArray.creditStatus.lastActivityDate | ||
18 | + CollectionStatus = result.subscriberStatusHistoryInfoArray.collectionStatus.status | ||
19 | + CollectionReasonCode = result.subscriberStatusHistoryInfoArray.collectionStatus.reasonCode | ||
20 | + CollectionReasonDescription = result.subscriberStatusHistoryInfoArray.collectionStatus.reasonDescription | ||
21 | + CollectionActivityDate = result.subscriberStatusHistoryInfoArray.collectionStatus.lastActivityDate | ||
22 | + BarringStatus = result.subscriberStatusHistoryInfoArray.barringByRequestIndicator | ||
23 | + BarringActivityDate = result.subscriberStatusHistoryInfoArray.barringByRequestActivityDate | ||
24 | + BarringByRequestReasonCode = result.subscriberStatusHistoryInfoArray.barringByRequestReasonCode | ||
25 | + BarringByRequestReasonDescription = result.subscriberStatusHistoryInfoArray.barringByRequestReasonDescription | ||
26 | + CreditLimitAtSubStatus = result.subscriberStatusHistoryInfoArray.creditLimitAtSubStatus.status | ||
27 | + CreditLimitAtSubActivityDate = result.subscriberStatusHistoryInfoArray.creditLimitAtSubStatus.lastActivityDate | ||
28 | + CreditLimitAtSubReason = result.subscriberStatusHistoryInfoArray.creditLimitAtSubStatus.reasonDescription | ||
29 | + | ||
30 | + | ||
31 | + if( null != statusReasonCode ) | ||
32 | + Reason = StatusReasonCode+" : "+StatusReasonDescription | ||
33 | + | ||
34 | + | ||
35 | + if( null != CreditReasonCode ) | ||
36 | + CreditLimitReason = CreditReasonCode+" : "+CreditReasonDescription | ||
37 | + | ||
38 | + if(null != CollectionReasonCode) | ||
39 | + CollectionReason = CollectionReasonCode+" : "+CollectionReasonDescription | ||
40 | + | ||
41 | + if(null != temp.getBarringByRequestReasonCode) // tid kah temp khue a rai??? | ||
42 | + BarringReason = BarringByRequestReasonCode+" : "+BarringByRequestReasonDescription | ||
43 | + | ||
44 | + if (null != Since ) | ||
45 | + Since = Since | ||
46 | + | ||
47 | + if (null!= CollectionActivityDate ) | ||
48 | + CollectionActivityDate = CollectionActivityDate | ||
49 | + | ||
50 | + if (null != CreditLimitActivityDate ) | ||
51 | + CreditLimitActivityDate = CreditLimitActivityDate | ||
52 | + | ||
53 | + if (null != CreditLimitAtSubActivityDate ) | ||
54 | + CreditLimitAtSubActivityDate = CreditLimitAtSubActivityDate | ||
55 | + | ||
56 | + if ( null != BarringActivityDate ) | ||
57 | + BarringActivityDate = BarringActivityDate | ||
58 | + | ||
59 | + | ||
60 | + if("A" == StatusCode){ | ||
61 | + | ||
62 | + if("CAN" == CollectionStatus() || "CAN" == CreditLimitStatus || "CAN" == CreditLimitAtSubStatus){ // CollectionStatus() un nee khue fn a rai??? | ||
63 | + Status = "Cancelled" | ||
64 | + | ||
65 | + }else if("SUS" == CollectionStatus || "SUS" == CreditLimitStatus || "SUS" == CreditLimitAtSubStatus ){ | ||
66 | + Status = "Full Suspend" | ||
67 | + | ||
68 | + }else if("PSUS" == CollectionStatus || "PSUS" == CreditLimitStatus || "PSUS" == CreditLimitAtSubStatus || "Y" == BarringStatus){ | ||
69 | + Status = "Soft Suspend" | ||
70 | + | ||
71 | + }else{ | ||
72 | + Status = "Active" | ||
73 | + } | ||
74 | + | ||
75 | + }else{ | ||
76 | + // mapping | ||
77 | + // NONE null | ||
78 | + // CAN Cancelled | ||
79 | + // RES Restore | ||
80 | + // SUS Full Suspend | ||
81 | + // PSUS Soft Suspend | ||
82 | + // C Cancelled | ||
83 | + // T Terminate | ||
84 | + // S Full Suspend | ||
85 | + // U Suspend-Collection | ||
86 | + // D Suspend-Collection | ||
87 | + // L Collection | ||
88 | + // Y Soft Suspend | ||
89 | + String mappedStatus = mapping(StatusCode) // see Mapping 5 --> yang mai hen wa chai tong nai | ||
90 | + | ||
91 | + if("CAN" == CollectionStatus || "CAN" == CreditLimitStatus || "CAN" == CreditLimitAtSubStatus){ | ||
92 | + Status = "Cancelled" | ||
93 | + | ||
94 | + }else if("SUS" == CollectionStatus || "SUS" == CreditLimitStatus || "SUS" == CreditLimitAtSubStatus){ | ||
95 | + Status = "Full Suspend" | ||
96 | + | ||
97 | + }else if("PSUS" == CollectionStatus || "PSUS" == CreditLimitStatus || "PSUS" == CreditLimitAtSubStatus || "Y" == BarringStatus ){ | ||
98 | + Status = "Soft Suspend" | ||
99 | + | ||
100 | + }else { | ||
101 | + Status = "Active" | ||
102 | + } | ||
103 | + | ||
104 | + } | ||
105 | + | ||
106 | + mappedCreditLimitStatus = mapping(CreditLimitStatus) // see Mapping 5 | ||
107 | + CreditLimitStatus = mappedCreditLimitStatus | ||
108 | + | ||
109 | + mappedCollectionStatus = mapping(CollectionStatus) // see Mapping 5 | ||
110 | + CollectionStatus = mappedCollectionStatus | ||
111 | + | ||
112 | + mappedBarringStatus = mapping(BarringStatus) // see Mapping 5 | ||
113 | + BarringStatus = mappedBarringStatus | ||
114 | + | ||
115 | + mappedCreditLimitAtSubStatus = mapping(CreditLimitAtSubStatus) // see Mapping 5 | ||
116 | + CreditLimitAtSubStatus = mappedCreditLimitAtSubStatus | ||
117 | + | ||
118 | + check = false; | ||
119 | + arrayTmp = [] | ||
120 | + | ||
121 | + if ( "Soft Suspend" == BarringStatus ) { | ||
122 | + arrayTmp.add([BarringActivityDate, BarringStatus+" Since: "+BarringActivityDate+ "("+BarringReason+")"]) | ||
123 | + check = true; | ||
124 | + } | ||
125 | + | ||
126 | + if ( null != CreditLimitStatus ) { | ||
127 | + arrayTmp.add([CreditLimitActivityDate, CreditLimitStatus+" Since: "+CreditLimitActivityDate+"("+CreditLimitReason+")"]) | ||
128 | + check = true; | ||
129 | + } | ||
130 | + | ||
131 | + if ( null != CollectionStatus ) { | ||
132 | + arrayTmp.add([CollectionActivityDate, CollectionStatus+" Since: "+CollectionActivityDate+ "("+CollectionReason+")"]) | ||
133 | + check = true; | ||
134 | + } | ||
135 | + | ||
136 | + if ( "NONE" != CreditLimitAtSubStatus && null != CreditLimitAtSubStatus ) { | ||
137 | + | ||
138 | + message = CreditLimitAtSubStatus+ " Since: "+CreditLimitAtSubActivityDate+"("+CreditLimitAtSubReason+")" | ||
139 | + | ||
140 | + // arrayTmp.add([CreditLimitAtSubActivityDate, CreditLimitAtSubStatus+ " Since: "+CreditLimitAtSubActivityDate+"("+CreditLimitAtSubReason+")"]) | ||
141 | + // check = true; | ||
142 | + } | ||
143 | + | ||
144 | + if (check) { | ||
145 | + if ( "A" != StatusCode ) { | ||
146 | + arrayTmp.add([Since, Status + " Since: "+Since+"("+Reason+")"]) | ||
147 | + } | ||
148 | + } else { | ||
149 | + if ( null != Status ) { | ||
150 | + arrayTmp.add([Since, Status+ " Since: "+Since+"("+Reason+")"]) | ||
151 | + } | ||
152 | + } | ||
153 | + | ||
154 | +// arrayTmp = [ | ||
155 | +// ["10/01/1995", "Soft Suspend Since :10/01/1995(reason)"], | ||
156 | +// ["10/01/1995", "Soft Suspend Since :10/01/1995(reason)"] | ||
157 | +// ] | ||
158 | + | ||
159 | + if (arrayTmp.size() > 0) { | ||
160 | + | ||
161 | + StringBuilder subStatusBuilder = new StringBuilder(); | ||
162 | + | ||
163 | + subStatusBuilder.append(temp.getStatus()) // value temp ?? | ||
164 | + subStatusBuilder.append("\n") | ||
165 | + | ||
166 | + sort(arrayTmp) // reang jak mak pai noi or noi pai mak | ||
167 | + | ||
168 | + for (String[] sTmp : arrayTmp) { | ||
169 | + subStatusBuilder.append(sTmp[1]) | ||
170 | + subStatusBuilder.append("\n") | ||
171 | + } | ||
172 | + | ||
173 | + SubStatus = subStatusBuilder.toString()); | ||
174 | + | ||
175 | + SubStatus = `$getStatus | ||
176 | + Restore Since: 09/01/1995($CollectionReason) | ||
177 | + Cancelled Since: 10/01/1995($Reason) | ||
178 | + Soft Suspend Since: 11/01/1995(reason)` | ||
179 | + | ||
180 | + } | ||
181 | +} | ||
182 | + | ||
183 | + | ||
184 | +$getStatus | ||
185 | +Restore Since: 09/01/1995($CollectionReason) | ||
186 | +Cancelled Since: 10/01/1995($Reason) | ||
187 | +Soft Suspend Since: 11/01/1995(reason) | ||
188 | + | ||
189 | + // * --------------------------------------------------------------------------------------------------------------- * // | ||
190 | + | ||
191 | + | ||
192 | + | ||
193 | + | ||
194 | + | ||
195 | + | ||
196 | +ResultList = /getProductHistoryListResponse/return/productHistoryList/subscriberStatusHistoryInfoArray | ||
197 | + | ||
198 | +for (r in ResultList) { | ||
199 | + | ||
200 | + StatusCode = r.status.statusCode | ||
201 | + Activity = r.status.lastActivityPathId | ||
202 | + StatusReasonCode = r.status.statusReasonCode | ||
203 | + StatusReasonDescription = r.status.statusReasonDescription | ||
204 | + Since = r.effectiveDate | ||
205 | + PreviousSubscriber = r.linkPrevProductId | ||
206 | + NextSubscriber = r.linkNextProductId | ||
207 | + CreditLimitStatus = r.creditStatus.status | ||
208 | + CreditReasonCode = r.creditStatus.reasonCode | ||
209 | + CreditReasonDescription = r.creditStatus.reasonDescription | ||
210 | + CreditLimitActivityDate = r.creditStatus.lastActivityDate | ||
211 | + CollectionStatus = r.collectionStatus.status | ||
212 | + CollectionReasonCode = r.collectionStatus.reasonCode | ||
213 | + CollectionReasonDescription = r.collectionStatus.reasonDescription | ||
214 | + CollectionActivityDate = r.collectionStatus.lastActivityDate | ||
215 | + BarringStatus = r.barringByRequestIndicator | ||
216 | + BarringActivityDate = r.barringByRequestActivityDate | ||
217 | + BarringByRequestReasonCode = r.barringByRequestReasonCode | ||
218 | + BarringByRequestReasonDescription = r.barringByRequestReasonDescription | ||
219 | + CreditLimitAtSubStatus = r.creditLimitAtSubStatus.status | ||
220 | + CreditLimitAtSubActivityDate = r.creditLimitAtSubStatus.lastActivityDate | ||
221 | + CreditLimitAtSubReason = r.creditLimitAtSubStatus.reasonDescription | ||
222 | + | ||
223 | + if( null != statusReasonCode ) | ||
224 | + Reason = StatusReasonCode+" : "+StatusReasonDescription | ||
225 | + //eg. Reason = 'RSP5 : Restore Subs - Found' | ||
226 | + | ||
227 | + | ||
228 | + if( null != CreditReasonCode ) | ||
229 | + CreditLimitReason = CreditReasonCode+" : "+CreditReasonDescription | ||
230 | + | ||
231 | + if(null != CollectionReasonCode) | ||
232 | + CollectionReason = CollectionReasonCode+" : "+CollectionReasonDescription | ||
233 | + | ||
234 | + if(null != BarringByRequestReasonCode) | ||
235 | + BarringReason = BarringByRequestReasonCode+" : "+BarringByRequestReasonDescription | ||
236 | + | ||
237 | + | ||
238 | + if (null != Since ) | ||
239 | + Since = Since | ||
240 | + | ||
241 | + if (null!= CollectionActivityDate ) | ||
242 | + CollectionActivityDate = CollectionActivityDate | ||
243 | + | ||
244 | + if (null != CreditLimitActivityDate ) | ||
245 | + CreditLimitActivityDate = CreditLimitActivityDate | ||
246 | + | ||
247 | + if (null != CreditLimitAtSubActivityDate ) | ||
248 | + CreditLimitAtSubActivityDate = CreditLimitAtSubActivityDate | ||
249 | + | ||
250 | + if ( null != BarringActivityDate ) | ||
251 | + BarringActivityDate = BarringActivityDate | ||
252 | + | ||
253 | + if("A" == StatusCode){ | ||
254 | + | ||
255 | + if("CAN" == CollectionStatus || "CAN" == CreditLimitStatus || "CAN" == CreditLimitAtSubStatus){ | ||
256 | + Status = "Cancelled" | ||
257 | + }else if("SUS" == CollectionStatus || "SUS" == CreditLimitStatus || "SUS" == CreditLimitAtSubStatus ){ | ||
258 | + Status = "Full Suspend" | ||
259 | + | ||
260 | + }else if("PSUS" == CollectionStatus || "PSUS" == CreditLimitStatus || "PSUS" == CreditLimitAtSubStatus || "Y" == BarringStatus){ | ||
261 | + Status = "Soft Suspend" | ||
262 | + | ||
263 | + }else{ | ||
264 | + Status = "Active" | ||
265 | + } | ||
266 | + | ||
267 | +} else { | ||
268 | + String mappedStatus = mapping(StatusCode) // see Mapping 5 | ||
269 | + | ||
270 | + // # Mapping 5 | ||
271 | + // # NONE null | ||
272 | + // # CAN Cancelled | ||
273 | + // # RES Restore | ||
274 | + // # SUS Full Suspend | ||
275 | + // # PSUS Soft Suspend | ||
276 | + // # C Cancelled | ||
277 | + // # T Terminate | ||
278 | + // # S Full Suspend | ||
279 | + // # U Suspend-Collection | ||
280 | + // # D Suspend-Collection | ||
281 | + // # L Collection | ||
282 | + // # Y Soft Suspend | ||
283 | + | ||
284 | + if (mappedStatus != null) { | ||
285 | + | ||
286 | + Status = mappedStatus | ||
287 | + | ||
288 | + } else { | ||
289 | + if("CAN" == CollectionStatus || "CAN" == CreditLimitStatus || "CAN" == CreditLimitAtSubStatus){ | ||
290 | + Status = "Cancelled" | ||
291 | + | ||
292 | + }else if("SUS" == CollectionStatus || "SUS" == CreditLimitStatus || "SUS" == CreditLimitAtSubStatus){ | ||
293 | + Status = "Full Suspend" | ||
294 | + | ||
295 | + }else if("PSUS" == CollectionStatus || "PSUS" == CreditLimitStatus || "PSUS" == CreditLimitAtSubStatus || "Y" == BarringStatus ){ | ||
296 | + Status = "Soft Suspend" | ||
297 | + | ||
298 | + }else { | ||
299 | + Status = null | ||
300 | + } | ||
301 | + } | ||
302 | + } | ||
303 | + | ||
304 | +// # Mapping 5 | ||
305 | +// # NONE null | ||
306 | +// # CAN Cancelled | ||
307 | +// # RES Restore | ||
308 | +// # SUS Full Suspend | ||
309 | +// # PSUS Soft Suspend | ||
310 | +// # C Cancelled | ||
311 | +// # T Terminate | ||
312 | +// # S Full Suspend | ||
313 | +// # U Suspend-Collection | ||
314 | +// # D Suspend-Collection | ||
315 | +// # L Collection | ||
316 | +// # Y Soft Suspend | ||
317 | + | ||
318 | + mappedCreditLimitStatus = mapping(CreditLimitStatus) // see Mapping 5 | ||
319 | + CreditLimitStatus = mappedCreditLimitStatus | ||
320 | + | ||
321 | + mappedCollectionStatus = mapping(CollectionStatus) // see Mapping 5 | ||
322 | + CollectionStatus = mappedCollectionStatus | ||
323 | + | ||
324 | + mappedBarringStatus = mapping(BarringStatus) // see Mapping 5 | ||
325 | + BarringStatus = mappedBarringStatus | ||
326 | + | ||
327 | + mappedCreditLimitAtSubStatus = mapping(CreditLimitAtSubStatus) // see Mapping 5 | ||
328 | + CreditLimitAtSubStatus = mappedCreditLimitAtSubStatus | ||
329 | + | ||
330 | + check = false; | ||
331 | + arrayTmp = new Array(); | ||
332 | + | ||
333 | + if ( "Soft Suspend" == BarringStatus ) { | ||
334 | + arrayTmp.add(BarringStatus+" Since: "+BarringActivityDate+ "("+BarringReason+")") | ||
335 | + // arrayTmp.add(new String[]{BarringActivityDate, BarringStatus+" Since: "+BarringActivityDate+ "("+BarringReason+")"}) | ||
336 | + check = true; | ||
337 | + } | ||
338 | + | ||
339 | + if ( null != CreditLimitStatus ) { | ||
340 | + arrayTmp.add(CreditLimitStatus+" Since: "+CreditLimitActivityDate+"("+CreditLimitReason+")") | ||
341 | + // arrayTmp.add(new String[]{CreditLimitActivityDate, CreditLimitStatus+" Since: "+CreditLimitActivityDate+"("+CreditLimitReason+")"}) | ||
342 | + check = true; | ||
343 | + } | ||
344 | + | ||
345 | + if ( null != CollectionStatus ) { | ||
346 | + arrayTmp.add(CollectionStatus+" Since: "+CollectionActivityDate+ "("+CollectionReason+")") | ||
347 | + // arrayTmp.add(new String[]{CollectionActivityDate, CollectionStatus+" Since: "+CollectionActivityDate+ "("+CollectionReason+")"}) | ||
348 | + check = true; | ||
349 | + } | ||
350 | + | ||
351 | + if ( "NONE" != CreditLimitAtSubStatus && null != CreditLimitAtSubStatus ) { | ||
352 | + arrayTmp.add(CreditLimitAtSubStatus+ " Since: "+CreditLimitAtSubActivityDate+"("+CreditLimitAtSubReason+")") | ||
353 | + // arrayTmp.add(new String[]{CreditLimitAtSubActivityDate, CreditLimitAtSubStatus+ " Since: "+CreditLimitAtSubActivityDate+"("+CreditLimitAtSubReason+")"}) | ||
354 | + check = true; | ||
355 | + } | ||
356 | + | ||
357 | + if (check) { | ||
358 | + if ( "A" != StatusCode ) { | ||
359 | + arrayTmp.add(Status + " Since: "+Since+"("+Reason+")") | ||
360 | + } | ||
361 | + } | ||
362 | + else { | ||
363 | + if ( null != Status ) { | ||
364 | + arrayTmp.add(Status+ " Since: "+Since+"("Reason+")") | ||
365 | + } | ||
366 | + } | ||
367 | + | ||
368 | + if (arrayTmp.size() > 0) { | ||
369 | + fn_sort(arrayTmp) // Sort ตามวันที่(parameter หลัง Since: xxx) มาก ไป น้อย ให้เอาเฉพาะวันที่ที่มากที่สุด | ||
370 | + SubStatus = arrayTmp[0] // ตัวแรก(index)ของ arrayTmp | ||
371 | + } | ||
372 | +} | ||
0 | \ No newline at end of file | 373 | \ No newline at end of file |
@@ -0,0 +1,1254 @@ | @@ -0,0 +1,1254 @@ | ||
1 | +module.exports.getAccountCustomerInfo = async (req, res) => { | ||
2 | + console.log('===== POST getAccountCustomerInfo =====') | ||
3 | + console.log('url', req.originalUrl); | ||
4 | + console.log('headers', req.headers); | ||
5 | + console.log('query', req.query); | ||
6 | + console.log('params', req.params); | ||
7 | + console.log('body', req.body); | ||
8 | + | ||
9 | + let response = { | ||
10 | + "getAccountCustomerInfoResponse": { | ||
11 | + "return": { | ||
12 | + "withholdingTaxRate": "3", | ||
13 | + "errorCode": "OSBbllngA00001", | ||
14 | + "type": "ax21:AccountCustomerInfoResponse", | ||
15 | + "message": "Success.", | ||
16 | + "uuid": "4b8541d3-e6b4-44c3-8291-8688e5dc72cc", | ||
17 | + "account": { | ||
18 | + "accountCollection": { | ||
19 | + "collectionIndicator": "", | ||
20 | + "suspensionReason": "", | ||
21 | + "fullSuspensionIndicator": "", | ||
22 | + "punishmentLevels": "", | ||
23 | + "startDate": { | ||
24 | + "nil": true | ||
25 | + }, | ||
26 | + "status": "NONE" | ||
27 | + }, | ||
28 | + "classify": "R", | ||
29 | + "accountSubType": { | ||
30 | + "code": "EVP", | ||
31 | + "description": "Enterprise VIP" | ||
32 | + }, | ||
33 | + "ben": { | ||
34 | + "consolidateIndicator": "N", | ||
35 | + "billLanguage": "TH", | ||
36 | + "ben": "10000787", | ||
37 | + "bcBanId": "1465", | ||
38 | + "billMedia": "P", | ||
39 | + "status": { | ||
40 | + "code": "O", | ||
41 | + "description": "Open" | ||
42 | + } | ||
43 | + }, | ||
44 | + "type": "ax24:AccountInfo", | ||
45 | + "legacyBan": "", | ||
46 | + "exernalId": "", | ||
47 | + "ouId": "1282", | ||
48 | + "delinquent": "", | ||
49 | + "contact": { | ||
50 | + "preferredContactNo": "*", | ||
51 | + "officePhone": "", | ||
52 | + "homePhone": "023345678", | ||
53 | + "language": "TH", | ||
54 | + "privatePhone": "", | ||
55 | + "fax": "", | ||
56 | + "email": "" | ||
57 | + }, | ||
58 | + "agreementId": "1820", | ||
59 | + "customerId": "2456", | ||
60 | + "creditLimit": { | ||
61 | + "creditClass": "BV", | ||
62 | + "creditLimitReasonCode": "CREQ", | ||
63 | + "personalCreditLimit": "1000.0", | ||
64 | + "creditLimitExpirationDate": { | ||
65 | + "nil": true | ||
66 | + }, | ||
67 | + "temporaryCreditLimit": "0.0", | ||
68 | + "obligationCalculationFormula": "Formula 2" | ||
69 | + }, | ||
70 | + "company": { | ||
71 | + "code": "RF", | ||
72 | + "description": "True Move H Universal Communication Co., Ltd" | ||
73 | + }, | ||
74 | + "arBalance": "853.86", | ||
75 | + "accountPriority": "", | ||
76 | + "address": { | ||
77 | + "country": "", | ||
78 | + "zipCode": "10540", | ||
79 | + "roomNo": "", | ||
80 | + "city": "สมุทรปราการ", | ||
81 | + "addressType": "B", | ||
82 | + "moo": "", | ||
83 | + "soi": "", | ||
84 | + "building": "", | ||
85 | + "street": "บางพลีน้อย", | ||
86 | + "district": "บางพลี", | ||
87 | + "addressLine1": "13 * *", | ||
88 | + "houseNo": "13", | ||
89 | + "addressLine2": "* * * * บางพลีน้อย", | ||
90 | + "addressLine3": "* บางปลา * บางพลี", | ||
91 | + "addressLine4": "สมุทรปราการ 10540", | ||
92 | + "floor": "", | ||
93 | + "subDistrict": "บางปลา" | ||
94 | + }, | ||
95 | + "parentBan": { | ||
96 | + "nil": true | ||
97 | + }, | ||
98 | + "initiationReason": { | ||
99 | + "nil": true | ||
100 | + }, | ||
101 | + "creditStatus": { | ||
102 | + "reasonDescription": "", | ||
103 | + "lastActivityDate": { | ||
104 | + "nil": true | ||
105 | + }, | ||
106 | + "reasonCode": "", | ||
107 | + "status": "NONE" | ||
108 | + }, | ||
109 | + "convergenceCode": "", | ||
110 | + "accountId": "10000787", | ||
111 | + "statusDescription": "Active", | ||
112 | + "collectionStatus": { | ||
113 | + "reasonDescription": "", | ||
114 | + "lastActivityDate": { | ||
115 | + "nil": true | ||
116 | + }, | ||
117 | + "reasonCode": "", | ||
118 | + "status": "NONE" | ||
119 | + }, | ||
120 | + "taxId": "", | ||
121 | + "withholdingTaxUpdateDate": { | ||
122 | + "nil": true | ||
123 | + }, | ||
124 | + "withholdingTaxIndicator": "N", | ||
125 | + "name": { | ||
126 | + "branchCode": "", | ||
127 | + "nameType": "B", | ||
128 | + "firstName": "", | ||
129 | + "lastName": "", | ||
130 | + "organizationName": "มหาวิทยาลัยหอการค้าไทย", | ||
131 | + "branchName": "", | ||
132 | + "middleName": "", | ||
133 | + "storeId": "", | ||
134 | + "tilte": "" | ||
135 | + }, | ||
136 | + "openDate": "2013-03-02T11:32:16.000+07:00", | ||
137 | + "branchNo": "" | ||
138 | + }, | ||
139 | + "customer": { | ||
140 | + "creditLimitIndicator": "N", | ||
141 | + "income": "", | ||
142 | + "timeInBusiness": "1311", | ||
143 | + "occupation": "", | ||
144 | + "type": "ax24:CustomerInfo", | ||
145 | + "customerType": { | ||
146 | + "code": "C", | ||
147 | + "description": "Corporate" | ||
148 | + }, | ||
149 | + "exernalId": "", | ||
150 | + "lastActivityCode": "NEW_ACCOUNT", | ||
151 | + "contactLanguage": "TH", | ||
152 | + "educationLevel": "", | ||
153 | + "contact": { | ||
154 | + "preferredContactNo": "", | ||
155 | + "officePhone": "", | ||
156 | + "homePhone": "023345678", | ||
157 | + "language": "TH", | ||
158 | + "privatePhone": "", | ||
159 | + "fax": "", | ||
160 | + "email": "" | ||
161 | + }, | ||
162 | + "customerId": "2456", | ||
163 | + "trueCardGrading": { | ||
164 | + "nil": true | ||
165 | + }, | ||
166 | + "certificateExpirationDate": "2014-12-31", | ||
167 | + "marketingChannel": "", | ||
168 | + "offerCurrency": "THB", | ||
169 | + "expirationDate": { | ||
170 | + "nil": true | ||
171 | + }, | ||
172 | + "registerDate": "2013-03-02T11:32:13.000+07:00", | ||
173 | + "creditClass": "BX", | ||
174 | + "address": { | ||
175 | + "country": "", | ||
176 | + "zipCode": "10540", | ||
177 | + "roomNo": "", | ||
178 | + "city": "สมุทรปราการ", | ||
179 | + "addressType": "B", | ||
180 | + "moo": "", | ||
181 | + "soi": "", | ||
182 | + "building": "", | ||
183 | + "sinceDate": "2013-03-02T11:32:13+07:00", | ||
184 | + "street": "บางพลีน้อย", | ||
185 | + "district": "บางพลี", | ||
186 | + "addressLine1": "13 * *", | ||
187 | + "houseNo": "13", | ||
188 | + "addressLine2": "* * * * บางพลีน้อย", | ||
189 | + "addressLine3": "* บางปลา * บางพลี", | ||
190 | + "addressLine4": "สมุทรปราการ 10540", | ||
191 | + "floor": "", | ||
192 | + "subDistrict": "บางปลา" | ||
193 | + }, | ||
194 | + "totalProduct": "1", | ||
195 | + "personal": { | ||
196 | + "gender": "", | ||
197 | + "accommodation": { | ||
198 | + "nil": true | ||
199 | + }, | ||
200 | + "maritalStatus": "" | ||
201 | + }, | ||
202 | + "birthDate": "1987-11-30", | ||
203 | + "lastActivityReasonCode": "CREQ", | ||
204 | + "nationality": "", | ||
205 | + "certificateNumber": "337/2515", | ||
206 | + "largeCustomerIndicator": "N", | ||
207 | + "periodOfWork": { | ||
208 | + "nil": true | ||
209 | + }, | ||
210 | + "billCycleInfo": { | ||
211 | + "changeCycleRequestStatus": "N", | ||
212 | + "newBillCycle": { | ||
213 | + "nil": true | ||
214 | + }, | ||
215 | + "changeCycleReqeustDate": { | ||
216 | + "nil": true | ||
217 | + }, | ||
218 | + "billCycle": { | ||
219 | + "code": "2", | ||
220 | + "description": "Monthly Cycle close on the 1" | ||
221 | + }, | ||
222 | + "changeCycleIndicator": "N" | ||
223 | + }, | ||
224 | + "dealer": { | ||
225 | + "code": "90225773", | ||
226 | + "description": "คุณจรรจิรา จรรยาลิขิต" | ||
227 | + }, | ||
228 | + "name": { | ||
229 | + "branchCode": "", | ||
230 | + "nameType": "B", | ||
231 | + "firstName": "", | ||
232 | + "lastName": "", | ||
233 | + "organizationName": "มหาวิทยาลัยหอการค้าไทย", | ||
234 | + "branchName": "", | ||
235 | + "middleName": "", | ||
236 | + "storeId": "", | ||
237 | + "tilte": "" | ||
238 | + }, | ||
239 | + "customerGrading": "TOP", | ||
240 | + "taxExemptionIndicator": "N", | ||
241 | + "job": "", | ||
242 | + "effectiveDate": "2013-03-02T11:32:16.000+07:00", | ||
243 | + "certificateType": "O" | ||
244 | + } | ||
245 | + } | ||
246 | + } | ||
247 | + } | ||
248 | + | ||
249 | + res.status(200).send(response) | ||
250 | +} | ||
251 | + | ||
252 | +module.exports.getLastInvoiceList = async (req, res) => { | ||
253 | + console.log('===== GET getLastInvoiceList =====') | ||
254 | + console.log('url', req.originalUrl); | ||
255 | + console.log('headers', req.headers); | ||
256 | + console.log('query', req.query); | ||
257 | + console.log('params', req.params); | ||
258 | + console.log('body', req.body); | ||
259 | + | ||
260 | + let response = { | ||
261 | + "getLastInvoiceListResponse": { | ||
262 | + "return": { | ||
263 | + "invoiceList": { | ||
264 | + "size": "4", | ||
265 | + "invoiceInfoArray": [ | ||
266 | + { | ||
267 | + "discountTaxAmount": "0", | ||
268 | + "adjustmentNetAmount": "0", | ||
269 | + "availableAdjustmentNetAmount": "699", | ||
270 | + "invoiceBcBanId": "813", | ||
271 | + "dueDate": "2013-06-26T00:00:00.000+07:00", | ||
272 | + "vatRate": "0.00", | ||
273 | + "converageEndDate": "2013-06-01T00:00:00.000+07:00", | ||
274 | + "discountAmount": "0", | ||
275 | + "invoiceTaxAmount": "48.93", | ||
276 | + "invoiceAmount": "699", | ||
277 | + "invoiceStatusChangeDate": "2013-06-12T00:00:00.000+07:00", | ||
278 | + "paymentAmount": "0", | ||
279 | + "baNo": "10000449", | ||
280 | + "billTaxAmount": "293.58", | ||
281 | + "billingDocumentType": { | ||
282 | + "code": "BL", | ||
283 | + "description": "Bill" | ||
284 | + }, | ||
285 | + "billAmount": "4487.58", | ||
286 | + "invoiceType": "BILL", | ||
287 | + "converageStartDate": "2013-05-02T00:00:00.000+07:00", | ||
288 | + "currency": "THB", | ||
289 | + "billSequenceNo": "293", | ||
290 | + "invoiceNo": "140620130200002104", | ||
291 | + "originalBalanceAmount": "747.93", | ||
292 | + "customerManagerBaNo": "10000449", | ||
293 | + "invoiceCreationDate": "2013-06-12T00:00:00.000+07:00", | ||
294 | + "unpaidNetAmount": "699", | ||
295 | + "availableAdjustmentAmount": "992.58", | ||
296 | + "discountNetAmount": "0", | ||
297 | + "billDate": "2013-06-03T00:00:00.000+07:00", | ||
298 | + "disputeNetAmount": "0.00", | ||
299 | + "creditTaxAmount": "0", | ||
300 | + "accountId": "10000449", | ||
301 | + "billProductType": "", | ||
302 | + "billingDocumentStatus": { | ||
303 | + "code": "N", | ||
304 | + "description": "Confirmed" | ||
305 | + }, | ||
306 | + "unpaidAmount": "747.93", | ||
307 | + "restrictionAmount": "0", | ||
308 | + "disputeTaxAmount": "0.00", | ||
309 | + "invoiceCycle": { | ||
310 | + "code": "2", | ||
311 | + "month": "6", | ||
312 | + "year": "2013" | ||
313 | + }, | ||
314 | + "convergenceInvoiceNo": "140620130200002104", | ||
315 | + "coveredAmount": "0", | ||
316 | + "invoiceId": "8627", | ||
317 | + "performanceIndStatus": "", | ||
318 | + "unpaidTaxAmount": "48.93", | ||
319 | + "invoiceStatus": "O", | ||
320 | + "adjustmentAmount": "0", | ||
321 | + "restrictionTaxAmount": "0" | ||
322 | + }, | ||
323 | + { | ||
324 | + "discountTaxAmount": "0", | ||
325 | + "adjustmentNetAmount": "0", | ||
326 | + "availableAdjustmentNetAmount": "699", | ||
327 | + "invoiceBcBanId": "813", | ||
328 | + "dueDate": "2013-06-05T00:00:00.000+07:00", | ||
329 | + "vatRate": "0.00", | ||
330 | + "converageEndDate": "2013-05-01T00:00:00.000+07:00", | ||
331 | + "discountAmount": "0", | ||
332 | + "invoiceTaxAmount": "48.93", | ||
333 | + "invoiceAmount": "699", | ||
334 | + "invoiceStatusChangeDate": "2013-05-12T00:00:00.000+07:00", | ||
335 | + "paymentAmount": "0", | ||
336 | + "baNo": "10000449", | ||
337 | + "billTaxAmount": "293.58", | ||
338 | + "billingDocumentType": { | ||
339 | + "code": "BL", | ||
340 | + "description": "Bill" | ||
341 | + }, | ||
342 | + "billAmount": "4487.58", | ||
343 | + "invoiceType": "BILL", | ||
344 | + "converageStartDate": "2013-04-02T00:00:00.000+07:00", | ||
345 | + "currency": "THB", | ||
346 | + "billSequenceNo": "292", | ||
347 | + "invoiceNo": "140520130200001097", | ||
348 | + "originalBalanceAmount": "747.93", | ||
349 | + "customerManagerBaNo": "10000449", | ||
350 | + "invoiceCreationDate": "2013-05-12T00:00:00.000+07:00", | ||
351 | + "unpaidNetAmount": "699", | ||
352 | + "availableAdjustmentAmount": "992.58", | ||
353 | + "discountNetAmount": "0", | ||
354 | + "billDate": "2013-05-13T00:00:00.000+07:00", | ||
355 | + "disputeNetAmount": "0.00", | ||
356 | + "creditTaxAmount": "0", | ||
357 | + "accountId": "10000449", | ||
358 | + "billProductType": "", | ||
359 | + "billingDocumentStatus": { | ||
360 | + "code": "N", | ||
361 | + "description": "Confirmed" | ||
362 | + }, | ||
363 | + "unpaidAmount": "747.93", | ||
364 | + "restrictionAmount": "0", | ||
365 | + "disputeTaxAmount": "0.00", | ||
366 | + "invoiceCycle": { | ||
367 | + "code": "2", | ||
368 | + "month": "5", | ||
369 | + "year": "2013" | ||
370 | + }, | ||
371 | + "convergenceInvoiceNo": "140520130200001097", | ||
372 | + "coveredAmount": "0", | ||
373 | + "invoiceId": "20448", | ||
374 | + "performanceIndStatus": "", | ||
375 | + "unpaidTaxAmount": "48.93", | ||
376 | + "invoiceStatus": "O", | ||
377 | + "adjustmentAmount": "0", | ||
378 | + "restrictionTaxAmount": "0" | ||
379 | + }, | ||
380 | + { | ||
381 | + "discountTaxAmount": "0", | ||
382 | + "adjustmentNetAmount": "0", | ||
383 | + "availableAdjustmentNetAmount": "0.00", | ||
384 | + "invoiceBcBanId": "813", | ||
385 | + "dueDate": "2013-04-26T00:00:00.000+07:00", | ||
386 | + "vatRate": "0.00", | ||
387 | + "converageEndDate": "", | ||
388 | + "discountAmount": "0", | ||
389 | + "invoiceTaxAmount": "0", | ||
390 | + "invoiceAmount": "0", | ||
391 | + "invoiceStatusChangeDate": "2013-04-02T00:00:00.000+07:00", | ||
392 | + "paymentAmount": "0", | ||
393 | + "baNo": "10000449", | ||
394 | + "billTaxAmount": "0", | ||
395 | + "billingDocumentType": { | ||
396 | + "code": "BL", | ||
397 | + "description": "Bill" | ||
398 | + }, | ||
399 | + "billAmount": "0.00", | ||
400 | + "invoiceType": "CN", | ||
401 | + "converageStartDate": "", | ||
402 | + "currency": "THB", | ||
403 | + "billSequenceNo": "291", | ||
404 | + "invoiceNo": "140420130200000419", | ||
405 | + "originalBalanceAmount": "0", | ||
406 | + "customerManagerBaNo": "10000449", | ||
407 | + "invoiceCreationDate": "2013-04-02T00:00:00.000+07:00", | ||
408 | + "unpaidNetAmount": "0", | ||
409 | + "availableAdjustmentAmount": "0.00", | ||
410 | + "discountNetAmount": "0", | ||
411 | + "billDate": "2013-04-03T00:00:00.000+07:00", | ||
412 | + "disputeNetAmount": "0.00", | ||
413 | + "creditTaxAmount": "0", | ||
414 | + "accountId": "10000449", | ||
415 | + "billProductType": "", | ||
416 | + "billingDocumentStatus": { | ||
417 | + "code": "N", | ||
418 | + "description": "Confirmed" | ||
419 | + }, | ||
420 | + "unpaidAmount": "0", | ||
421 | + "restrictionAmount": "0.00", | ||
422 | + "disputeTaxAmount": "0.00", | ||
423 | + "invoiceCycle": { | ||
424 | + "code": "2", | ||
425 | + "month": "4", | ||
426 | + "year": "2013" | ||
427 | + }, | ||
428 | + "convergenceInvoiceNo": "140420130200000419", | ||
429 | + "coveredAmount": "0", | ||
430 | + "invoiceId": "3145", | ||
431 | + "performanceIndStatus": "", | ||
432 | + "unpaidTaxAmount": "0", | ||
433 | + "invoiceStatus": "F", | ||
434 | + "adjustmentAmount": "0", | ||
435 | + "restrictionTaxAmount": "0.00" | ||
436 | + }, | ||
437 | + { | ||
438 | + "discountTaxAmount": "0", | ||
439 | + "adjustmentNetAmount": "0", | ||
440 | + "availableAdjustmentNetAmount": "0.00", | ||
441 | + "invoiceBcBanId": "813", | ||
442 | + "dueDate": "2013-03-26T00:00:00.000+07:00", | ||
443 | + "vatRate": "0.00", | ||
444 | + "converageEndDate": "", | ||
445 | + "discountAmount": "0", | ||
446 | + "invoiceTaxAmount": "0", | ||
447 | + "invoiceAmount": "0", | ||
448 | + "invoiceStatusChangeDate": "2013-03-02T00:00:00.000+07:00", | ||
449 | + "paymentAmount": "0", | ||
450 | + "baNo": "10000449", | ||
451 | + "billTaxAmount": "0", | ||
452 | + "billingDocumentType": { | ||
453 | + "code": "BL", | ||
454 | + "description": "Bill" | ||
455 | + }, | ||
456 | + "billAmount": "0.00", | ||
457 | + "invoiceType": "CN", | ||
458 | + "converageStartDate": "", | ||
459 | + "currency": "THB", | ||
460 | + "billSequenceNo": "290", | ||
461 | + "invoiceNo": "140320130200000071", | ||
462 | + "originalBalanceAmount": "0", | ||
463 | + "customerManagerBaNo": "10000449", | ||
464 | + "invoiceCreationDate": "2013-03-02T00:00:00.000+07:00", | ||
465 | + "unpaidNetAmount": "0", | ||
466 | + "availableAdjustmentAmount": "0.00", | ||
467 | + "discountNetAmount": "0", | ||
468 | + "billDate": "2013-03-03T00:00:00.000+07:00", | ||
469 | + "disputeNetAmount": "0.00", | ||
470 | + "creditTaxAmount": "0", | ||
471 | + "accountId": "10000449", | ||
472 | + "billProductType": "", | ||
473 | + "billingDocumentStatus": { | ||
474 | + "code": "N", | ||
475 | + "description": "Confirmed" | ||
476 | + }, | ||
477 | + "unpaidAmount": "0", | ||
478 | + "restrictionAmount": "0.00", | ||
479 | + "disputeTaxAmount": "0.00", | ||
480 | + "invoiceCycle": { | ||
481 | + "code": "2", | ||
482 | + "month": "3", | ||
483 | + "year": "2013" | ||
484 | + }, | ||
485 | + "convergenceInvoiceNo": "140320130200000071", | ||
486 | + "coveredAmount": "0", | ||
487 | + "invoiceId": "629", | ||
488 | + "performanceIndStatus": "", | ||
489 | + "unpaidTaxAmount": "0", | ||
490 | + "invoiceStatus": "F", | ||
491 | + "adjustmentAmount": "0", | ||
492 | + "restrictionTaxAmount": "0.00" | ||
493 | + } | ||
494 | + ] | ||
495 | + }, | ||
496 | + "errorCode": "OSBbllngA00001", | ||
497 | + "message": "Success.", | ||
498 | + "uuid": "530dbd96-bada-4fcd-85d0-a829ba1347d7" | ||
499 | + } | ||
500 | + } | ||
501 | + } | ||
502 | + | ||
503 | + res.status(200).send(response) | ||
504 | +} | ||
505 | + | ||
506 | +module.exports.getLastDocumentList = async (req, res) => { | ||
507 | + console.log('===== POST getLastDocumentList =====') | ||
508 | + console.log('url', req.originalUrl); | ||
509 | + console.log('headers', req.headers); | ||
510 | + console.log('query', req.query); | ||
511 | + console.log('params', req.params); | ||
512 | + console.log('body', req.body); | ||
513 | + | ||
514 | + let response = { | ||
515 | + "getLastDocumentListResponse": { | ||
516 | + "return": { | ||
517 | + "invoiceList": { | ||
518 | + "size": "1", | ||
519 | + "invoiceInfoArray": [ | ||
520 | + { | ||
521 | + "discountTaxAmount": "0.00", | ||
522 | + "adjustmentNetAmount": "0.00", | ||
523 | + "availableAdjustmentNetAmount": "0.00", | ||
524 | + "invoiceBcBanId": "", | ||
525 | + "dueDate": "", | ||
526 | + "vatRate": "0.00", | ||
527 | + "converageEndDate": "", | ||
528 | + "discountAmount": "0.00", | ||
529 | + "invoiceTaxAmount": "0.00", | ||
530 | + "invoiceAmount": "0.00", | ||
531 | + "invoiceStatusChangeDate": "", | ||
532 | + "paymentAmount": "0", | ||
533 | + "baNo": "", | ||
534 | + "billTaxAmount": "0.00", | ||
535 | + "billingDocumentType": { | ||
536 | + "code": "BL", | ||
537 | + "description": "Bill" | ||
538 | + }, | ||
539 | + "billAmount": "0.00", | ||
540 | + "invoiceType": "", | ||
541 | + "converageStartDate": "", | ||
542 | + "currency": "THB", | ||
543 | + "billSequenceNo": "", | ||
544 | + "invoiceNo": "", | ||
545 | + "originalBalanceAmount": "0.00", | ||
546 | + "customerManagerBaNo": "", | ||
547 | + "invoiceCreationDate": "", | ||
548 | + "unpaidNetAmount": "0.00", | ||
549 | + "availableAdjustmentAmount": "0.00", | ||
550 | + "discountNetAmount": "0.00", | ||
551 | + "billDate": "2021-07-30T00:00:00.000+07:00", | ||
552 | + "disputeNetAmount": "0.00", | ||
553 | + "creditTaxAmount": "0.00", | ||
554 | + "accountId": "200112081", | ||
555 | + "billProductType": "DR", | ||
556 | + "billingDocumentStatus": { | ||
557 | + "code": "C", | ||
558 | + "description": "Calculated" | ||
559 | + }, | ||
560 | + "unpaidAmount": "0.00", | ||
561 | + "restrictionAmount": "0.00", | ||
562 | + "disputeTaxAmount": "0.00", | ||
563 | + "invoiceCycle": { | ||
564 | + "code": "", | ||
565 | + "month": "", | ||
566 | + "year": "" | ||
567 | + }, | ||
568 | + "convergenceInvoiceNo": "010720212800390921", | ||
569 | + "coveredAmount": "0.00", | ||
570 | + "invoiceId": "", | ||
571 | + "performanceIndStatus": "CH", | ||
572 | + "unpaidTaxAmount": "0", | ||
573 | + "invoiceStatus": "", | ||
574 | + "adjustmentAmount": "0", | ||
575 | + "restrictionTaxAmount": "0.00" | ||
576 | + } | ||
577 | + ] | ||
578 | + }, | ||
579 | + "errorCode": "OSBbllngA00001", | ||
580 | + "message": "Success.", | ||
581 | + "uuid": "56281a17-157d-4a4a-994d-c5e814b860e4" | ||
582 | + } | ||
583 | + } | ||
584 | + } | ||
585 | + | ||
586 | + res.status(200).send(response) | ||
587 | +} | ||
588 | + | ||
589 | +module.exports.getLastDocumentList = async (req, res) => { | ||
590 | + console.log('===== POST getLastDocumentList =====') | ||
591 | + console.log('url', req.originalUrl); | ||
592 | + console.log('headers', req.headers); | ||
593 | + console.log('query', req.query); | ||
594 | + console.log('params', req.params); | ||
595 | + console.log('body', req.body); | ||
596 | + | ||
597 | + let response = { | ||
598 | + "getLastDocumentListResponse": { | ||
599 | + "return": { | ||
600 | + "invoiceList": { | ||
601 | + "size": "1", | ||
602 | + "invoiceInfoArray": [ | ||
603 | + { | ||
604 | + "discountTaxAmount": "0.00", | ||
605 | + "adjustmentNetAmount": "0.00", | ||
606 | + "availableAdjustmentNetAmount": "0.00", | ||
607 | + "invoiceBcBanId": "", | ||
608 | + "dueDate": "", | ||
609 | + "vatRate": "0.00", | ||
610 | + "converageEndDate": "", | ||
611 | + "discountAmount": "0.00", | ||
612 | + "invoiceTaxAmount": "0.00", | ||
613 | + "invoiceAmount": "0.00", | ||
614 | + "invoiceStatusChangeDate": "", | ||
615 | + "paymentAmount": "0", | ||
616 | + "baNo": "", | ||
617 | + "billTaxAmount": "0.00", | ||
618 | + "billingDocumentType": { | ||
619 | + "code": "BL", | ||
620 | + "description": "Bill" | ||
621 | + }, | ||
622 | + "billAmount": "0.00", | ||
623 | + "invoiceType": "", | ||
624 | + "converageStartDate": "", | ||
625 | + "currency": "THB", | ||
626 | + "billSequenceNo": "", | ||
627 | + "invoiceNo": "", | ||
628 | + "originalBalanceAmount": "0.00", | ||
629 | + "customerManagerBaNo": "", | ||
630 | + "invoiceCreationDate": "", | ||
631 | + "unpaidNetAmount": "0.00", | ||
632 | + "availableAdjustmentAmount": "0.00", | ||
633 | + "discountNetAmount": "0.00", | ||
634 | + "billDate": "2021-07-30T00:00:00.000+07:00", | ||
635 | + "disputeNetAmount": "0.00", | ||
636 | + "creditTaxAmount": "0.00", | ||
637 | + "accountId": "200112081", | ||
638 | + "billProductType": "DR", | ||
639 | + "billingDocumentStatus": { | ||
640 | + "code": "C", | ||
641 | + "description": "Calculated" | ||
642 | + }, | ||
643 | + "unpaidAmount": "0.00", | ||
644 | + "restrictionAmount": "0.00", | ||
645 | + "disputeTaxAmount": "0.00", | ||
646 | + "invoiceCycle": { | ||
647 | + "code": "", | ||
648 | + "month": "", | ||
649 | + "year": "" | ||
650 | + }, | ||
651 | + "convergenceInvoiceNo": "010720212800390921", | ||
652 | + "coveredAmount": "0.00", | ||
653 | + "invoiceId": "", | ||
654 | + "performanceIndStatus": "CH", | ||
655 | + "unpaidTaxAmount": "0", | ||
656 | + "invoiceStatus": "", | ||
657 | + "adjustmentAmount": "0", | ||
658 | + "restrictionTaxAmount": "0.00" | ||
659 | + } | ||
660 | + ] | ||
661 | + }, | ||
662 | + "errorCode": "OSBbllngA00001", | ||
663 | + "message": "Success.", | ||
664 | + "uuid": "56281a17-157d-4a4a-994d-c5e814b860e4" | ||
665 | + } | ||
666 | + } | ||
667 | + } | ||
668 | + | ||
669 | + res.status(200).send(response) | ||
670 | +} | ||
671 | + | ||
672 | +module.exports.getCreditLimitInfo = async (req, res) => { | ||
673 | + console.log('===== POST getCreditLimitInfo =====') | ||
674 | + console.log('url', req.originalUrl); | ||
675 | + console.log('headers', req.headers); | ||
676 | + console.log('query', req.query); | ||
677 | + console.log('params', req.params); | ||
678 | + console.log('body', req.body); | ||
679 | + | ||
680 | + let response = { | ||
681 | + "getCreditLimitInfoResponse": { | ||
682 | + "return": { | ||
683 | + "currentSpendingLimitList": { | ||
684 | + "size": "0" | ||
685 | + }, | ||
686 | + "futureCreditLimitAtSubList": { | ||
687 | + "size": "0" | ||
688 | + }, | ||
689 | + "currentCreditLimitAtSubList": { | ||
690 | + "size": "0" | ||
691 | + }, | ||
692 | + "futureSpendingLimitList": { | ||
693 | + "size": "0" | ||
694 | + }, | ||
695 | + "errorCode": "OSBbllngA00001", | ||
696 | + "message": "Success.", | ||
697 | + "uuid": "da63fabc-cfe0-4233-a9fe-7dcf922ffb0f", | ||
698 | + "creditLimitInfo": { | ||
699 | + "accountId": "200112081", | ||
700 | + "creditClass": "F", | ||
701 | + "personalCreditLimit": "400", | ||
702 | + "customerId": "334580", | ||
703 | + "creditLimit": "400", | ||
704 | + "defaultCreditLimit": "1", | ||
705 | + "obligationFormula": "Formula 1", | ||
706 | + "temporaryCreditLimit": "0" | ||
707 | + } | ||
708 | + } | ||
709 | + } | ||
710 | + } | ||
711 | + | ||
712 | + res.status(200).send(response) | ||
713 | +} | ||
714 | + | ||
715 | +module.exports.getBillMediaInfo = async (req, res) => { | ||
716 | + console.log('===== GET getBillMediaInfo =====') | ||
717 | + console.log('url', req.originalUrl); | ||
718 | + console.log('headers', req.headers); | ||
719 | + console.log('query', req.query); | ||
720 | + console.log('params', req.params); | ||
721 | + console.log('body', req.body); | ||
722 | + | ||
723 | + let response = { | ||
724 | + "getBillMediaInfoResponse": { | ||
725 | + "return": { | ||
726 | + "billMediaInfo": { | ||
727 | + "billMediaCode": "S", | ||
728 | + "billMediaDescription": "SMS", | ||
729 | + "billMediaValue": "0911111111" | ||
730 | + }, | ||
731 | + "errorCode": "OSBbllngA00001", | ||
732 | + "message": "Success.", | ||
733 | + "uuid": "a06924ed-f8b1-4778-97aa-cf3a0d47b094" | ||
734 | + } | ||
735 | + } | ||
736 | + } | ||
737 | + | ||
738 | + res.status(200).send(response) | ||
739 | +} | ||
740 | + | ||
741 | +module.exports.getProductHistoryList = async (req, res) => { | ||
742 | + console.log('===== POST getProductHistoryList =====') | ||
743 | + console.log('url', req.originalUrl); | ||
744 | + console.log('headers', req.headers); | ||
745 | + console.log('query', req.query); | ||
746 | + console.log('params', req.params); | ||
747 | + console.log('body', req.body); | ||
748 | + | ||
749 | + let response = { | ||
750 | + "getProductHistoryListResponse": { | ||
751 | + "return": { | ||
752 | + "totalSize": "59", | ||
753 | + "productHistoryList": { | ||
754 | + "size": "2", | ||
755 | + "subscriberStatusHistoryInfoArray": [ | ||
756 | + { | ||
757 | + "barringByRequestActivityDate": "2016-09-01T17:25:03.000+07:00", | ||
758 | + "barringByRequestIndicator": "N", | ||
759 | + "collectionStatus": { | ||
760 | + "reasonDescription": "Default Request for restore from suspension from Reg CL", | ||
761 | + "lastActivityDate": "2018-11-07T07:15:02.000+07:00", | ||
762 | + "reasonCode": "DEFRS", | ||
763 | + "status": "NONE" | ||
764 | + }, | ||
765 | + "linkPrevProductId": "", | ||
766 | + "barringByRequestReasonCode": "DDSC", | ||
767 | + "creditLimitAtSubStatus": { | ||
768 | + "reasonDescription": "", | ||
769 | + "lastActivityDate": "", | ||
770 | + "reasonCode": "", | ||
771 | + "status": "NONE" | ||
772 | + }, | ||
773 | + "subscriberId": "1111841", | ||
774 | + "barringByRequestReasonDescription": "Delete Additional Offer", | ||
775 | + "creditStatus": { | ||
776 | + "reasonDescription": "Restore from Suspension request from Credit Limit Collection", | ||
777 | + "lastActivityDate": "2017-07-30T12:23:44.000+07:00", | ||
778 | + "reasonCode": "MONRS", | ||
779 | + "status": "NONE" | ||
780 | + }, | ||
781 | + "linkNextProductId": "", | ||
782 | + "effectiveDate": "2018-11-07T07:15:02.000+07:00", | ||
783 | + "status": { | ||
784 | + "statusDate": "2016-09-01T17:32:41.000+07:00", | ||
785 | + "statusLastActivity": "16", | ||
786 | + "statusDescription": "Active", | ||
787 | + "statusReasonDescription": "Restore Subs - Found", | ||
788 | + "statusReasonCode": "RSP5", | ||
789 | + "lastActivityPathId": "78", | ||
790 | + "statusCode": "A" | ||
791 | + } | ||
792 | + }, | ||
793 | + { | ||
794 | + "barringByRequestActivityDate": "2016-09-01T17:25:03.000+07:00", | ||
795 | + "barringByRequestIndicator": "N", | ||
796 | + "collectionStatus": { | ||
797 | + "reasonDescription": "Default Request for restore from suspension from Reg CL", | ||
798 | + "lastActivityDate": "2018-08-14T19:29:43.000+07:00", | ||
799 | + "reasonCode": "DEFRS", | ||
800 | + "status": "NONE" | ||
801 | + }, | ||
802 | + "linkPrevProductId": "", | ||
803 | + "barringByRequestReasonCode": "DDSC", | ||
804 | + "creditLimitAtSubStatus": { | ||
805 | + "reasonDescription": "", | ||
806 | + "lastActivityDate": "", | ||
807 | + "reasonCode": "", | ||
808 | + "status": "NONE" | ||
809 | + }, | ||
810 | + "subscriberId": "1111841", | ||
811 | + "barringByRequestReasonDescription": "Delete Additional Offer", | ||
812 | + "creditStatus": { | ||
813 | + "reasonDescription": "Restore from Suspension request from Credit Limit Collection", | ||
814 | + "lastActivityDate": "2017-07-30T12:23:44.000+07:00", | ||
815 | + "reasonCode": "MONRS", | ||
816 | + "status": "NONE" | ||
817 | + }, | ||
818 | + "linkNextProductId": "", | ||
819 | + "effectiveDate": "2018-08-14T19:29:43.000+07:00", | ||
820 | + "status": { | ||
821 | + "statusDate": "2016-09-01T17:32:41.000+07:00", | ||
822 | + "statusLastActivity": "16", | ||
823 | + "statusDescription": "Active", | ||
824 | + "statusReasonDescription": "Restore Subs - Found", | ||
825 | + "statusReasonCode": "RSP5", | ||
826 | + "lastActivityPathId": "78", | ||
827 | + "statusCode": "A" | ||
828 | + } | ||
829 | + } | ||
830 | + ] | ||
831 | + }, | ||
832 | + "calculatedPageSize": "2", | ||
833 | + "errorCode": "OSBbllngA00001", | ||
834 | + "message": "Success.", | ||
835 | + "uuid": "84943fc3-00c2-424b-a432-23860fcc7ad3" | ||
836 | + } | ||
837 | + } | ||
838 | + } | ||
839 | + | ||
840 | + res.status(200).send(response) | ||
841 | +} | ||
842 | + | ||
843 | +module.exports.getPaymentList = async (req, res) => { | ||
844 | + console.log('===== GET getPaymentList =====') | ||
845 | + console.log('url', req.originalUrl); | ||
846 | + console.log('headers', req.headers); | ||
847 | + console.log('query', req.query); | ||
848 | + console.log('params', req.params); | ||
849 | + console.log('body', req.body); | ||
850 | + | ||
851 | + let response = { | ||
852 | + "getPaymentListResponse": { | ||
853 | + "return": { | ||
854 | + "totalSize": "131", | ||
855 | + "calculatedPageSize": "1", | ||
856 | + "errorCode": "OSBbllngA00001", | ||
857 | + "type": "ax28:PaymentListResponse", | ||
858 | + "message": "Success.", | ||
859 | + "uuid": "1271b6ef-54e6-472c-867f-36dad1a97781", | ||
860 | + "paymentList": { | ||
861 | + "size": "1", | ||
862 | + "type": "ax211:PaymentList", | ||
863 | + "paymentInfoArray": [ | ||
864 | + { | ||
865 | + "billSeqNo": "7645", | ||
866 | + "activityIndicator": "P", | ||
867 | + "originalConvertedAmount": "1000", | ||
868 | + "authorizationId": "485021", | ||
869 | + "defaultWhtAmount": "0", | ||
870 | + "creditCardType": "", | ||
871 | + "postingDate": "2016-07-11T00:00:00.000+07:00", | ||
872 | + "paymentId": "163939558", | ||
873 | + "ucWhtAmount": "", | ||
874 | + "periodKey": "30", | ||
875 | + "operatorId": "100", | ||
876 | + "paymentSourceDesc": "True Money - Echannels", | ||
877 | + "paymentSourceRTIndicator": "N", | ||
878 | + "rcWhtRate": "", | ||
879 | + "companyCode": "TI", | ||
880 | + "rcWhtAmount": "", | ||
881 | + "reversalTransId": "", | ||
882 | + "rctExtractInd": "", | ||
883 | + "transactionId": "1523941276", | ||
884 | + "vatAmount": "65.42", | ||
885 | + "convInvNumber": "", | ||
886 | + "creditCardNumber": "", | ||
887 | + "defaultWhtRate": "0", | ||
888 | + "ocWhtAmount": "", | ||
889 | + "paymentMethod": "CA", | ||
890 | + "designation": { | ||
891 | + "code": "", | ||
892 | + "description": "" | ||
893 | + }, | ||
894 | + "paymentSubMethod": "CA", | ||
895 | + "whtAmount": "0", | ||
896 | + "accountTimestamp": "2017101207465982860", | ||
897 | + "be": "0", | ||
898 | + "whtRate": "0", | ||
899 | + "creditAllocationList": { | ||
900 | + "creditAllocationInfoArray": [ | ||
901 | + { | ||
902 | + "invoiceId": "359694883", | ||
903 | + "invoiceNo": "6060812200372" | ||
904 | + }, | ||
905 | + { | ||
906 | + "invoiceId": "359731321", | ||
907 | + "invoiceNo": "6070812400386" | ||
908 | + } | ||
909 | + ], | ||
910 | + "size": "2" | ||
911 | + }, | ||
912 | + "ocWhtRate": "", | ||
913 | + "ucWhtRate": "", | ||
914 | + "creditId": "175519470", | ||
915 | + "creditCardExpDate": "122100", | ||
916 | + "printRtIndicator": "Y", | ||
917 | + "lastActStatusDate": "2016-09-27T00:00:00.000+07:00", | ||
918 | + "checkNo": "", | ||
919 | + "bankAccountNumber": "", | ||
920 | + "currency": "THB", | ||
921 | + "reasonCode": "", | ||
922 | + "actualAmt": "1000", | ||
923 | + "receiptTaxId": "ACEWL7452502", | ||
924 | + "bankCode": "", | ||
925 | + "partitionId": "7", | ||
926 | + "paymentSourceId": "TMNO", | ||
927 | + "valueDate": "2016-07-11T00:00:00.000+07:00", | ||
928 | + "userId": "TM03", | ||
929 | + "originalAccount": "203479997", | ||
930 | + "paymentSourceType": "O", | ||
931 | + "originalAmount": "1000", | ||
932 | + "activityType": "", | ||
933 | + "memoText": "", | ||
934 | + "directDebitVoucher": "38193159" | ||
935 | + } | ||
936 | + ] | ||
937 | + } | ||
938 | + } | ||
939 | + } | ||
940 | + } | ||
941 | + | ||
942 | + res.status(200).send(response) | ||
943 | +} | ||
944 | + | ||
945 | +module.exports.sumCollectionAmount = async (req, res) => { | ||
946 | + console.log('===== POST sumCollectionAmount =====') | ||
947 | + console.log('url', req.originalUrl); | ||
948 | + console.log('headers', req.headers); | ||
949 | + console.log('query', req.query); | ||
950 | + console.log('params', req.params); | ||
951 | + console.log('body', req.body); | ||
952 | + | ||
953 | + let response = `<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> | ||
954 | + <soap:Body> | ||
955 | + <ns3:sumCollectionAmountResponse xmlns:ns3="http://service.api.ccsm.truecorp.co.th" xmlns:ns1="http://bean.api.ccsm.truecorp.co.th"> | ||
956 | + <ns3:sumCollectionAmountRespBean> | ||
957 | + <ns1:errorCode>0</ns1:errorCode> | ||
958 | + <ns1:errorMessage>Success</ns1:errorMessage> | ||
959 | + <ns1:transID>ea1ca9a9-fee1-47ce-8e7d-f1b45ee1cade</ns1:transID> | ||
960 | + <ns1:totalBalance>0.0</ns1:totalBalance> | ||
961 | + <ns1:totalPastDue>0.0</ns1:totalPastDue> | ||
962 | + </ns3:sumCollectionAmountRespBean> | ||
963 | + </ns3:sumCollectionAmountResponse> | ||
964 | + </soap:Body> | ||
965 | +</soap:Envelope>` | ||
966 | + | ||
967 | + res.status(200).send(response) | ||
968 | +} | ||
969 | + | ||
970 | +module.exports.getBillingAddress = async (req, res) => { | ||
971 | + console.log('===== GET getBillingAddress =====') | ||
972 | + console.log('url', req.originalUrl); | ||
973 | + console.log('headers', req.headers); | ||
974 | + console.log('query', req.query); | ||
975 | + console.log('params', req.params); | ||
976 | + console.log('body', req.body); | ||
977 | + | ||
978 | + let response = { | ||
979 | + "getBillingInfoResponse": { | ||
980 | + "return": { | ||
981 | + "errorCode": "OSBbllngA00001", | ||
982 | + "message": "Success.", | ||
983 | + "uuid": "61ba9f6c-0b3c-4861-a82a-d252f0b23e63", | ||
984 | + "billing": { | ||
985 | + "billingArrangementInfo": { | ||
986 | + "statusDate": "2019-03-27T00:00:00.000+07:00", | ||
987 | + "consolidateBillInd": "Y", | ||
988 | + "lastUpdateDate": "2019-03-27T10:15:45.000+07:00", | ||
989 | + "businessEntityId": "0", | ||
990 | + "externalId": "", | ||
991 | + "bcBanID": "700046423", | ||
992 | + "billingArrangementStatus": "O", | ||
993 | + "itemizedTaxIndicator": "Y", | ||
994 | + "billFormat": "S", | ||
995 | + "splitParam": "", | ||
996 | + "billProductionIndicator": "Y", | ||
997 | + "billLang": "TH", | ||
998 | + "bcEffectiveDate": "2019-03-27T10:15:43.000+07:00", | ||
999 | + "openDate": "2019-03-27T00:00:00.000+07:00", | ||
1000 | + "billProductionFrequency": "1" | ||
1001 | + }, | ||
1002 | + "eTaxInfo": { | ||
1003 | + "notificationList": "", | ||
1004 | + "mobileNumberList": "", | ||
1005 | + "emailList": "", | ||
1006 | + "mediaValue": { | ||
1007 | + "code": "O", | ||
1008 | + "description": "Other" | ||
1009 | + } | ||
1010 | + }, | ||
1011 | + "address": { | ||
1012 | + "country": "", | ||
1013 | + "zipCode": "50200", | ||
1014 | + "roomNo": "-", | ||
1015 | + "city": "เชียงใหม่", | ||
1016 | + "addressType": "I", | ||
1017 | + "moo": "1", | ||
1018 | + "soi": "-", | ||
1019 | + "building": "UNI LOFT CHAINGMAI D", | ||
1020 | + "street": "-", | ||
1021 | + "district": "เมืองเชียงใหม่", | ||
1022 | + "addressLine1": "137 * 1 * - *", | ||
1023 | + "houseNo": "137", | ||
1024 | + "addressLine2": "* UNI LOFT CHAINGMAI D * - * - * -", | ||
1025 | + "timeAtAddress": "0101", | ||
1026 | + "addressLine3": "* สุเทพ * เมืองเชียงใหม่", | ||
1027 | + "addressLine4": "เชียงใหม่ 50200", | ||
1028 | + "floor": "-", | ||
1029 | + "subDistrict": "สุเทพ" | ||
1030 | + }, | ||
1031 | + "contact": { | ||
1032 | + "preferredContactNo": "", | ||
1033 | + "officePhone": "", | ||
1034 | + "homePhone": "0924971811", | ||
1035 | + "language": "", | ||
1036 | + "privatePhone": "", | ||
1037 | + "fax": "", | ||
1038 | + "email": "" | ||
1039 | + }, | ||
1040 | + "name": { | ||
1041 | + "branchCode": "", | ||
1042 | + "nameType": "I", | ||
1043 | + "firstName": "สัปปะรด", | ||
1044 | + "lastName": "ผลไม้", | ||
1045 | + "organizationName": "", | ||
1046 | + "branchName": "", | ||
1047 | + "middleName": "", | ||
1048 | + "storeId": "", | ||
1049 | + "tilte": "คุณ" | ||
1050 | + }, | ||
1051 | + "personal": { | ||
1052 | + "gender": "F", | ||
1053 | + "accommodation": "", | ||
1054 | + "maritalStatus": "" | ||
1055 | + } | ||
1056 | + } | ||
1057 | + } | ||
1058 | + } | ||
1059 | +} | ||
1060 | + | ||
1061 | + res.status(200).send(response) | ||
1062 | +} | ||
1063 | + | ||
1064 | +module.exports.getDCBStatus = async (req, res) => { | ||
1065 | + console.log('===== POST getDCBStatus =====') | ||
1066 | + console.log('url', req.originalUrl); | ||
1067 | + console.log('headers', req.headers); | ||
1068 | + console.log('query', req.query); | ||
1069 | + console.log('params', req.params); | ||
1070 | + console.log('body', req.body); | ||
1071 | + | ||
1072 | + let response = { | ||
1073 | + "code": 200, | ||
1074 | + "description": "Success", | ||
1075 | + "request_transaction_id": "CCBS_ON0023222046_14355965", | ||
1076 | + "mcs_transaction_id": "292a1e4176f440608c9cec23dfe01eb1", | ||
1077 | + "result": { | ||
1078 | + "subscriber_type": "POS", | ||
1079 | + "register_datetime": "2020-11-11T23:47:12", | ||
1080 | + "statuschange_datetime": "2020-11-11T23:47:12", | ||
1081 | + "cancel_datetime": null, | ||
1082 | + "msisdn": "66892143263", | ||
1083 | + "service_no": "66892143263", | ||
1084 | + "ref_type": "MSISDN", | ||
1085 | + "subscriber_id": "7766714", | ||
1086 | + "certificate_id": "3100201309134", | ||
1087 | + "company": "RM", | ||
1088 | + "status": "ACTIVE", | ||
1089 | + "cancel_reason": "", | ||
1090 | + "kyc": true, | ||
1091 | + "merchants": null | ||
1092 | + } | ||
1093 | + } | ||
1094 | + | ||
1095 | + res.status(200).send(response) | ||
1096 | +} | ||
1097 | + | ||
1098 | +module.exports.getBalanceList = async (req, res) => { | ||
1099 | + console.log('===== POST getBalanceList =====') | ||
1100 | + console.log('url', req.originalUrl); | ||
1101 | + console.log('headers', req.headers); | ||
1102 | + console.log('query', req.query); | ||
1103 | + console.log('params', req.params); | ||
1104 | + console.log('body', req.body); | ||
1105 | + | ||
1106 | + let response = { | ||
1107 | + "getBalanceListResponse": { | ||
1108 | + "return": { | ||
1109 | + "totalSize": "1", | ||
1110 | + "calculatedPageSize": "100", | ||
1111 | + "errorCode": "OSBbllngA00001", | ||
1112 | + "balanceList": { | ||
1113 | + "size": "1", | ||
1114 | + "balanceInfoArray": [ | ||
1115 | + { | ||
1116 | + "account": { | ||
1117 | + "minDueDateIndicator": "N", | ||
1118 | + "accountCollection": { | ||
1119 | + "status": "NONE" | ||
1120 | + }, | ||
1121 | + "classify": "R", | ||
1122 | + "maxDueDateIndicator": "N", | ||
1123 | + "accountSubType": { | ||
1124 | + "code": "RES", | ||
1125 | + "description": "Individual - Residential" | ||
1126 | + }, | ||
1127 | + "ben": { | ||
1128 | + "consolidateIndicator": "Y", | ||
1129 | + "billLanguage": "TH", | ||
1130 | + "ben": "200078606", | ||
1131 | + "bcBanId": "700046423", | ||
1132 | + "billMedia": "S", | ||
1133 | + "status": { | ||
1134 | + "code": "O", | ||
1135 | + "description": "Open" | ||
1136 | + } | ||
1137 | + }, | ||
1138 | + "comingDueDateIndicator": "N", | ||
1139 | + "ouId": "115614", | ||
1140 | + "delinquent": "", | ||
1141 | + "contact": { | ||
1142 | + "homePhone": "0924971811", | ||
1143 | + "language": "TH", | ||
1144 | + "preferredContactNo": "0909230076" | ||
1145 | + }, | ||
1146 | + "agreementId": "1344349", | ||
1147 | + "customerId": "187374", | ||
1148 | + "creditLimit": { | ||
1149 | + "creditClass": "X", | ||
1150 | + "creditLimitReasonCode": "CREQ", | ||
1151 | + "personalCreditLimit": "0", | ||
1152 | + "temporaryCreditLimit": "0", | ||
1153 | + "obligationCalculationFormula": "Formula 3" | ||
1154 | + }, | ||
1155 | + "company": { | ||
1156 | + "code": "TI", | ||
1157 | + "description": "True Internet Corporation Company Limited" | ||
1158 | + }, | ||
1159 | + "arBalance": "0", | ||
1160 | + "address": { | ||
1161 | + "zipCode": "50200", | ||
1162 | + "city": "เชียงใหม่", | ||
1163 | + "addressType": "I", | ||
1164 | + "district": "เมืองเชียงใหม่", | ||
1165 | + "addressLine1": "137 * 1 * - *", | ||
1166 | + "houseNo": "137", | ||
1167 | + "addressLine2": "* UNI LOFT CHAINGMAI D * - * - * -", | ||
1168 | + "addressLine3": "* สุเทพ * เมืองเชียงใหม่", | ||
1169 | + "addressLine4": "เชียงใหม่ 50200", | ||
1170 | + "subDistrict": "สุเทพ", | ||
1171 | + "sinceDate": "2019-03-27T00:00:00.000+07:00", | ||
1172 | + "building": "UNI LOFT CHAINGMAI D", | ||
1173 | + "floor": "-", | ||
1174 | + "moo": "1", | ||
1175 | + "roomNo": "-", | ||
1176 | + "soi": "-", | ||
1177 | + "street": "-" | ||
1178 | + }, | ||
1179 | + "creditStatus": { | ||
1180 | + "status": "NONE" | ||
1181 | + }, | ||
1182 | + "accountId": "200078606", | ||
1183 | + "statusDescription": "Active", | ||
1184 | + "collectionStatus": { | ||
1185 | + "lastActivityDate": "2021-12-30T00:00:00.000+07:00", | ||
1186 | + "status": "NONE" | ||
1187 | + }, | ||
1188 | + "withholdingTaxIndicator": "N", | ||
1189 | + "name": { | ||
1190 | + "nameType": "I", | ||
1191 | + "firstName": "สัปปะรด", | ||
1192 | + "lastName": "ผลไม้", | ||
1193 | + "title": "คุณ" | ||
1194 | + }, | ||
1195 | + "openDate": "2019-03-27T00:00:00.000+07:00", | ||
1196 | + "branchNo": "00000", | ||
1197 | + "convergenceCode": "4PPremium", | ||
1198 | + "taxId": "7175358721530", | ||
1199 | + "dcbAmount": "0.00", | ||
1200 | + "interestWaivingIndicator": "N", | ||
1201 | + "debtAge": "0" | ||
1202 | + }, | ||
1203 | + "customer": { | ||
1204 | + "creditLimitIndicator": "N", | ||
1205 | + "income": "0", | ||
1206 | + "creditClass": "X", | ||
1207 | + "timeInBusiness": "0101 ", | ||
1208 | + "occupation": "N", | ||
1209 | + "totalProduct": "3", | ||
1210 | + "birthDate": "1994-07-08T00:00:00.000+07:00", | ||
1211 | + "lastActivityReasonCode": "CREQ", | ||
1212 | + "customerType": { | ||
1213 | + "code": "I", | ||
1214 | + "description": "Individual" | ||
1215 | + }, | ||
1216 | + "lastActivityCode": "NEW_ACCOUNT", | ||
1217 | + "nationality": "THA", | ||
1218 | + "certificateNumber": "7175358721530", | ||
1219 | + "contactLanguage": "TH", | ||
1220 | + "largeCustomerIndicator": "N", | ||
1221 | + "billCycleInfo": { | ||
1222 | + "changeCycleRequestStatus": "N", | ||
1223 | + "billCycle": { | ||
1224 | + "code": "10", | ||
1225 | + "description": "Monthly Cycle close on the 9" | ||
1226 | + }, | ||
1227 | + "changeCycleIndicator": "N" | ||
1228 | + }, | ||
1229 | + "customerId": "187374", | ||
1230 | + "certificateExpirationDate": "2024-07-07T00:00:00.000+07:00", | ||
1231 | + "offerCurrency": "THB", | ||
1232 | + "effectiveDate": "2019-03-27T09:41:19.000+07:00", | ||
1233 | + "certificateType": "I", | ||
1234 | + "registerDate": "2019-03-27T00:00:00.000+07:00", | ||
1235 | + "customerGrading": "NON-TOP" | ||
1236 | + }, | ||
1237 | + "invoiceSummary": { | ||
1238 | + "interestFeeAmount": "0.00", | ||
1239 | + "collectionFeeAmount": "0.00", | ||
1240 | + "penaltyFeeAmount": "0.00", | ||
1241 | + "dcbPurchaseAmount": "0.00", | ||
1242 | + "overdueAmount": "0.00" | ||
1243 | + } | ||
1244 | + } | ||
1245 | + ] | ||
1246 | + }, | ||
1247 | + "message": "Success.", | ||
1248 | + "uuid": "5d51bb2f-af98-4007-82f8-04665052d886" | ||
1249 | + } | ||
1250 | + } | ||
1251 | +} | ||
1252 | + | ||
1253 | + res.status(200).send(response) | ||
1254 | +} | ||
0 | \ No newline at end of file | 1255 | \ No newline at end of file |