6485aa18
Nattapon W
update api for pr...
|
1
|
module.exports.assetDetail = async (req, res) => {
|
07502cdd
Nattapon W
update mockup true
|
2
3
4
5
6
7
|
console.log('===== POST assetDetail =====')
console.log('url', req.originalUrl);
console.log('headers', req.headers);
console.log('query', req.query);
console.log('params', req.params);
console.log('body', req.body);
|
6485aa18
Nattapon W
update api for pr...
|
8
|
|
07502cdd
Nattapon W
update mockup true
|
9
10
11
12
|
let responseErr = {
"code": "5000",
"msg": "Error bind json to model"
}
|
6485aa18
Nattapon W
update api for pr...
|
13
|
|
07502cdd
Nattapon W
update mockup true
|
14
|
let response = {
|
7fe25040
Nattapon W
update mockup true
|
15
|
"code": "500",
|
07502cdd
Nattapon W
update mockup true
|
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
"msg": "success.",
"outstandingBalance": 0,
"currentBillBalance": 1.61,
"dueDate": "21/11/2020",
"subStatus": {
"FullSusMsg": "No",
"status": "Active",
"detail": [{
"reason": "(SYSREQ)System Request",
"since": "05/10/2018 17:54:36"
}
]
},
"assetRowId": "1-2CN6IWH0",
"serviceId": "0952543411",
"productLine": "True Mobile",
"startDate": "16/07/2015",
"assetLifetime": "5 years, 4 months, 9 days",
"preferredLanguage": "Thai",
"productType": "Postpay",
"currentBillCycle": "28/27",
"lastPPEffectiveDate": "28/10/2019",
"lastFullSuspension": "No",
"credit": {
"limit": 2500,
"available": 2459.5,
"defaultCredit": "1000",
"temporary": "0",
"permanent": "2500",
"expiryDate": "",
"status": "Permanent",
"totalObligation": 40.5
},
"discount": {
"discountList": [{
"name": "CVG012",
"description": "True Smart Choice Discount 499",
"startDate": "05/10/2018",
"endDate": "06/10/2018"
}
],
"discountIndicator": "Yes"
},
"contract": {
"contractIndicator": "No",
"list": [{
"propositionCode": "CVG000000000052",
"propositionDescription": "TrueSmartChoice Regu 4G No Limit",
"term": "12",
"fee": 0,
"startDate": "04/10/2019",
|
7fe25040
Nattapon W
update mockup true
|
67
|
"expireDate": "05/10/2019",
|
07502cdd
Nattapon W
update mockup true
|
68
69
70
71
72
73
74
75
76
77
78
|
"contractIndicator": "No",
"offerCode": "12534317",
"contractNumber": "-",
"offerInstanceId": "162918628",
"terminationDate": ""
}, {
"propositionCode": "CVG000000000052",
"propositionDescription": "TrueSmartChoice Regu 4G No Limit",
"term": "12",
"fee": 0,
"startDate": "04/10/2019",
|
7fe25040
Nattapon W
update mockup true
|
79
|
"expireDate": "05/10/2019",
|
07502cdd
Nattapon W
update mockup true
|
80
81
82
83
84
85
86
87
88
89
|
"contractIndicator": "No",
"offerCode": "12534317",
"contractNumber": "-",
"offerInstanceId": "162918628",
"terminationDate": ""
}
]
},
"installAddress": {}
}
|
6485aa18
Nattapon W
update api for pr...
|
90
|
|
07502cdd
Nattapon W
update mockup true
|
91
|
res.status(200).send(response)
|
6485aa18
Nattapon W
update api for pr...
|
92
93
94
|
}
module.exports.churnScoreOfferList = async (req, res) => {
|
07502cdd
Nattapon W
update mockup true
|
95
96
97
98
99
100
|
console.log('===== POST churnScoreOfferList =====')
console.log('url', req.originalUrl);
console.log('headers', req.headers);
console.log('query', req.query);
console.log('params', req.params);
console.log('body', req.body);
|
6485aa18
Nattapon W
update api for pr...
|
101
|
|
07502cdd
Nattapon W
update mockup true
|
102
103
|
let responseErr = {
"code": "404",
|
16ea296b
Nattapon W
update mockup true
|
104
|
"message": "Not found"
|
07502cdd
Nattapon W
update mockup true
|
105
|
}
|
6485aa18
Nattapon W
update api for pr...
|
106
|
|
07502cdd
Nattapon W
update mockup true
|
107
|
let response = {
|
16ea296b
Nattapon W
update mockup true
|
108
109
|
"campTransID": "5c0a746b-ae69-447d-84b0-b0bdaa4b6add",
"campID": "0007",
|
07502cdd
Nattapon W
update mockup true
|
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
"campCode": "PRPTOL000001",
"campName": "PRP TOL CAMPAIGN",
"callScript": "",
"offerList": [
{
"productName": "True Online",
"offerCode": "VASUP121MOCJA01",
"offerName": "1000/500Mbps.",
"offerType": "VAS",
"offerTypeText": "VAS",
"offerDescTH": "VASUP121MOCJA01 : 1000/500Mbps.",
"offerDescEN": "VASUP121MOCJA01 : 1000/500Mbps.",
"serviceType": "85",
"autoAssign": "N",
"appointmentFlag": true
}
]
}
res.status(200).send(response)
|
6485aa18
Nattapon W
update api for pr...
|
130
|
}
|
07502cdd
Nattapon W
update mockup true
|
131
|
|
6485aa18
Nattapon W
update api for pr...
|
132
133
|
module.exports.usageInfo = async (req, res) => {
console.log('===== GET usageInfo =====')
|
c8832510
Nattapon W
update mockup for...
|
134
|
console.log('url', req.originalUrl);
|
07502cdd
Nattapon W
update mockup true
|
135
136
137
138
139
140
|
console.log('headers', req.headers);
console.log('query', req.query);
console.log('params', req.params);
console.log('body', req.body);
let responseErr = {
|
c8832510
Nattapon W
update mockup for...
|
141
|
"code": "404",
|
07502cdd
Nattapon W
update mockup true
|
142
143
|
"message": "Not found"
}
|
16ea296b
Nattapon W
update mockup true
|
144
|
|
07502cdd
Nattapon W
update mockup true
|
145
|
let response = {
|
c8832510
Nattapon W
update mockup for...
|
146
|
"trueId": {
|
07502cdd
Nattapon W
update mockup true
|
147
|
"device": "WEB",
|
16ea296b
Nattapon W
update mockup true
|
148
149
|
"lastAccess": "27/12/2018 04:51:12"
},
|
07502cdd
Nattapon W
update mockup true
|
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
|
"trueYou": {
"device": "WEB",
"lastAccess": "27/12/2018 04:25:42"
},
"iService": {
"device": "IOS",
"lastAccess": "27/12/2018 04:31:22"
},
"trueWallet": {
"device": "123",
"lastAccess": "123"
},
"tdgError": false,
"TrueMoneyError": true
}
res.status(200).send(response)
}
|
c8832510
Nattapon W
update mockup for...
|
169
|
module.exports.accumulationUOMGroupList = async (req, res) => {
|
07502cdd
Nattapon W
update mockup true
|
170
|
console.log('===== POST accumulationUOMGroupList =====')
|
5fdd6d1b
Nattapon W
update mockup for...
|
171
172
173
|
console.log('url', req.originalUrl);
console.log('headers', req.headers);
console.log('query', req.query);
|
07502cdd
Nattapon W
update mockup true
|
174
175
176
177
178
179
|
console.log('params', req.params);
console.log('body', req.body);
console.log(JSON.stringify(req.body))
let responseErr = {
|
5fdd6d1b
Nattapon W
update mockup for...
|
180
|
"errorCode": "OSBbllngA00002",
|
07502cdd
Nattapon W
update mockup true
|
181
|
"message": "Error.",
|
5fdd6d1b
Nattapon W
update mockup for...
|
182
|
}
|
07502cdd
Nattapon W
update mockup true
|
183
184
185
186
|
let response = {
"errorCode": "OSBbllngA00001",
"message": "Success.",
|
5fdd6d1b
Nattapon W
update mockup for...
|
187
|
"uuid": "ca517eac-b687-45f2-a921-c5138c44402e",
|
07502cdd
Nattapon W
update mockup true
|
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
|
"backendResponseList": {
"backendResponseInfoArray": [{
"apiName": "getPrimaryKeyInfoByActiveAndBusinessLine",
"errorCode": "OSBbllngA00001",
"message": "Success.",
"system": "OSB",
"url": "http://172.19.188.21:8080/ESB_Get_CustomerPreferenceInfo/Interfaces/Proxy/CommonPreferenceInfoPS"
}, {
"apiName": "getUnbilledCycleInfo",
"errorCode": "OSBbllngA00001",
"message": "Success.",
"system": "OSB",
"url": "http://172.19.188.21:8080/ESB_Get_FinancialManagementInfo/Interfaces/Proxy/BillingInfoPS"
}, {
"apiName": "getRatedPerformanceIndicators3",
"errorCode": "OSBbllngA00001",
"message": "Success.",
"system": "CCCSOA",
"url": "http://172.19.136.104/RaterServiceWS/RaterServiceSI"
}]
},
"accumulationUOMGroupList": {
"accumulationInfoArray": [{
"accumulatedCharge": 135,
"accumulatedQuantity": 191,
"accumulatedQuantityFormat": "03:11:00",
"lastCallDate": "2021-03-21T22:44:19.000+07:00",
"serviceType": "Voice",
"system": "CCBS",
"uomCode": "M"
}, {
"accumulatedCharge": 1013.5,
"accumulatedQuantity": 223,
"accumulatedQuantityFormat": null,
"lastCallDate": "2021-03-22T08:06:29.000+07:00",
"serviceType": "SMS",
"system": "CCBS",
"uomCode": "O"
}, {
"accumulatedCharge": 546.4,
"accumulatedQuantity": 223,
"accumulatedQuantityFormat": null,
"lastCallDate": "2021-03-22T08:06:29.000+07:00",
"serviceType": "Video",
"system": "CCBS",
"uomCode": "O"
}, {
"accumulatedCharge": 785.8,
"accumulatedQuantity": 223,
"accumulatedQuantityFormat": null,
"lastCallDate": "2021-03-22T08:06:29.000+07:00",
"serviceType": "Voice",
"system": "CCBS",
"uomCode": "O"
}, {
"accumulatedCharge": 1251.9,
"accumulatedQuantity": 258,
"accumulatedQuantityFormat": null,
"lastCallDate": "2021-03-22T08:06:29.000+07:00",
"serviceType": "Video",
"system": "CCBS",
"uomCode": "M"
}],
"size": 2
},
"cycleInfo": {
"code": 13,
"month": 4,
"year": 2021
},
"maxLastCallDate": "2021-03-22T08:06:29.000+07:00",
"rerateIndicator": "N"
}
res.status(200).send(responseErr)
}
|
5fdd6d1b
Nattapon W
update mockup for...
|
265
|
module.exports.getPrimaryKeyListWithoutResourceType = async (req, res) => {
|
07502cdd
Nattapon W
update mockup true
|
266
|
console.log('===== POST getPrimaryKeyListWithoutResourceType =====')
|
c8832510
Nattapon W
update mockup for...
|
267
268
|
console.log('url', req.originalUrl);
console.log('headers', req.headers);
|
07502cdd
Nattapon W
update mockup true
|
269
270
271
272
273
274
275
276
|
console.log('query', req.query);
console.log('params', req.params);
console.log('body', req.body);
let responseErr ={
"getPrimaryKeyListWithoutResourceTypeResponse": {
"return": {
"uuid": "f9336125-be9e-4c37-80c4-ab97990100cf",
|
f6530acd
Nattapon W
update mockup true
|
277
278
|
"errorCode": "OSBbllngA10001",
"message": "Error"
|
07502cdd
Nattapon W
update mockup true
|
279
280
281
282
283
284
285
|
}
}
}
let response = {
"getPrimaryKeyListWithoutResourceTypeResponse": {
"return": {
|
6485aa18
Nattapon W
update api for pr...
|
286
|
"uuid": "f9336125-be9e-4c37-80c4-ab97990100cf",
|
07502cdd
Nattapon W
update mockup true
|
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
|
"errorCode": "OSBbllngA00001",
"message": "Success.",
"primaryKeyList": {
"primaryKeyInfoArray": [
{
"accountId": "200093866",
"accountSubType": "RVT",
"agreementIdOfOU": "1392732",
"agreementIdOfRootOU": "",
"customerId": "213656",
"customerType": "I",
"ouId": "133066",
"primaryResourceType": "C",
"primaryResourceValue": "0968730341",
"productId": "1392733",
"productStatus": "A",
"rootOUId": "123",
"system": "CCBS"
}
],
"size": "1"
}
}
}
}
res.status(200).send(response)
}
|
f6530acd
Nattapon W
update mockup true
|
|
|