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": "0",
|
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": 1,
"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": 123,
"startDate": "04/10/2019",
|
7fe25040
Nattapon W
update mockup true
|
67
|
"expireDate": "10/08/2021",
|
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": "xxxx",
"startDate": "04/10/2019",
|
7fe25040
Nattapon W
update mockup true
|
79
|
"expireDate": "05/10/2022",
|
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
|
"msg": "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
|
"code": "0",
"msg": "Success",
|
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
|
"campTransID": "5c0a746b-ae69-447d-84b0-b0bdaa4b6add",
"campID": "0007",
"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
}
]
}
|
6485aa18
Nattapon W
update api for pr...
|
130
|
|
07502cdd
Nattapon W
update mockup true
|
131
|
res.status(200).send(response)
|
6485aa18
Nattapon W
update api for pr...
|
132
133
|
}
|
c8832510
Nattapon W
update mockup for...
|
134
|
module.exports.usageInfo = async (req, res) => {
|
07502cdd
Nattapon W
update mockup true
|
135
136
137
138
139
140
|
console.log('===== GET usageInfo =====')
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);
|
c8832510
Nattapon W
update mockup for...
|
141
|
|
07502cdd
Nattapon W
update mockup true
|
142
143
|
let responseErr = {
"code": "404",
|
16ea296b
Nattapon W
update mockup true
|
144
|
"msg": "Not found"
|
07502cdd
Nattapon W
update mockup true
|
145
|
}
|
c8832510
Nattapon W
update mockup for...
|
146
|
|
07502cdd
Nattapon W
update mockup true
|
147
|
let response = {
|
16ea296b
Nattapon W
update mockup true
|
148
149
|
"code": "0",
"msg": "Success",
|
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
|
"trueId": {
"device": "WEB",
"lastAccess": "27/12/2018 04:51:12"
},
"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
}
|
c8832510
Nattapon W
update mockup for...
|
169
|
|
07502cdd
Nattapon W
update mockup true
|
170
|
res.status(200).send(response)
|
5fdd6d1b
Nattapon W
update mockup for...
|
171
172
173
|
}
module.exports.accumulationUOMGroupList = async (req, res) => {
|
07502cdd
Nattapon W
update mockup true
|
174
175
176
177
178
179
|
console.log('===== POST accumulationUOMGroupList =====')
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);
|
5fdd6d1b
Nattapon W
update mockup for...
|
180
|
|
07502cdd
Nattapon W
update mockup true
|
181
|
console.log(JSON.stringify(req.body))
|
5fdd6d1b
Nattapon W
update mockup for...
|
182
|
|
07502cdd
Nattapon W
update mockup true
|
183
184
185
186
|
let responseErr = {
"errorCode": "OSBbllngA00002",
"message": "Error.",
}
|
5fdd6d1b
Nattapon W
update mockup for...
|
187
|
|
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
|
let response = {
"errorCode": "OSBbllngA00001",
"message": "Success.",
"uuid": "ca517eac-b687-45f2-a921-c5138c44402e",
"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"
}
|
5fdd6d1b
Nattapon W
update mockup for...
|
265
|
|
07502cdd
Nattapon W
update mockup true
|
266
|
res.status(200).send(responseErr)
|
c8832510
Nattapon W
update mockup for...
|
267
268
|
}
|
07502cdd
Nattapon W
update mockup true
|
269
270
271
272
273
274
275
276
|
module.exports.getPrimaryKeyListWithoutResourceType = async (req, res) => {
console.log('===== POST getPrimaryKeyListWithoutResourceType =====')
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);
|
f6530acd
Nattapon W
update mockup true
|
277
278
|
let responseErr = {
"getPrimaryKeyListWithoutResourceTypeResponse": {
|
07502cdd
Nattapon W
update mockup true
|
279
280
281
282
283
284
285
|
"return": {
"uuid": "f9336125-be9e-4c37-80c4-ab97990100cf",
"errorCode": "OSBbllngA10001",
"message": "Error"
}
}
}
|
6485aa18
Nattapon W
update api for pr...
|
286
|
|
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
315
316
317
318
|
let response = {
"getPrimaryKeyListWithoutResourceTypeResponse": {
"return": {
"uuid": "f9336125-be9e-4c37-80c4-ab97990100cf",
"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
|
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
|
module.exports.getBundleProfileList = async (req, res) => {
console.log('===== POST getBundleProfileList =====')
console.log('url', req.originalUrl);
console.log('headers', req.headers);
console.log('query', req.query);
console.log('params', req.params);
console.log('body', req.body);
let responseErr = {
"errorCode": "OSBbllngA00001",
"message": "Success.",
}
let response = {
"errorCode": "OSBbllngA00001",
"message": "Success.",
"uuid": "855bb4ff-e41e-4d84-86b3-d96853f79630",
"backendResponseList": {
"backendResponseInfoArray": [
{
"apiName": "getPrimaryKeyInfoByActiveAndBusinessLine",
"errorCode": "OSBbllngA00001",
"message": "Success.",
"system": "OSB",
"url": "http://172.19.231.21:8080/ESB_Get_CustomerPreferenceInfo/Interfaces/Proxy/CommonPreferenceInfoPS"
},
{
"apiName": "getUnbilledCycleInfo",
"errorCode": "OSBbllngA00001",
"message": "Success.",
"system": "CCCSOA",
"url": "http://172.19.136.104/BillingServiceIntegration/BillingServiceIntegrationSI"
},
{
"apiName": "getAccumulatedRatedPerformanceIndicators",
"errorCode": "OSBbllngA00001",
"message": "Success.",
"system": "CCCSOA",
"url": "http://172.19.136.104/RaterServiceWS/RaterServiceSI"
},
{
"apiName": "getOfferDetailList",
"errorCode": "OSBbllngA00001",
"message": "Success.",
"system": "OSB",
"url": "http://172.19.231.21:8080/ESB_Get_CustomerDataInfo/Interfaces/Proxy/OfferReferenceInfoPS"
}
],
"size": 4
},
"billingBundleList": {
"billingBundleInfoArray": [
{
"cycleInfo": {
"closeDay": 27,
"code": 28,
"endDate": "2021-05-27T00:00:00+07:00",
"month": 5,
"startDate": "2021-04-28T00:00:00+07:00",
"year": 2021
},
"effectiveDate": "2019-11-22T03:23:07.000+07:00",
"expirationDate": "2049-12-31T00:00:00.000+07:00",
"initialQuota": "200.00",
"initialQuotaFormat": "03:20:00",
"itemId": "1084229",
"lastCallDate": "2021-04-29T23:32:44.000+07:00",
"offer": {
"code": "11894312",
"engBillDescription": "5G Super Max Speed Plus 1399",
"name": "TMTOPS18",
"socType": "U",
"thaiBillDescription": "5G Super Max Speed Plus 1399"
},
"offerInstance": 408076475,
"remainingQuota": 178.00,
"remainingQuotaFormat": "02:58:00",
"roundedInitialQuota": 200.00,
"roundedInitialQuotaFormat": "03:20:00",
"serviceType": "Voice",
"uom": {
"code": "M",
"description": "Minutes"
},
"utilizedQuota": 22.00,
"utilizedQuotaFormat": "00:22:00"
},
{
"cycleInfo": {
"closeDay": 27,
"code": 28,
"endDate": "2021-05-27T00:00:00+07:00",
"month": 5,
"startDate": "2021-04-28T00:00:00+07:00",
"year": 2021
},
"effectiveDate": "2021-02-27T18:55:28.000+07:00",
"expirationDate": "2049-12-31T00:00:00.000+07:00",
"initialQuota": "600.00",
"initialQuotaFormat": "10:00:00",
"itemId": "12941725",
"lastCallDate": "1960-01-01T19:50:00.000+07:00",
"offer": {
"code": "18373529",
"engBillDescription": "5G Super Max Speed Plus 1399",
"name": "SMRTFP29",
"socType": "P",
"thaiBillDescription": "5G Super Max Speed Plus 1399"
},
"offerInstance": 760422462,
"remainingQuota": 600.00,
"remainingQuotaFormat": "10:00:00",
"roundedInitialQuota": 600.00,
"roundedInitialQuotaFormat": "10:00:00",
"serviceType": "Voice",
"uom": {
"code": "M",
"description": "Minutes"
},
"utilizedQuota": 0.00,
"utilizedQuotaFormat": "00:00:00"
},
{
"cycleInfo": {
"closeDay": 27,
"code": 28,
"endDate": "2021-05-27T00:00:00+07:00",
"month": 5,
"startDate": "2021-04-28T00:00:00+07:00",
"year": 2021
},
"effectiveDate": "2020-12-17T15:41:12.000+07:00",
"expirationDate": "2049-12-31T00:00:00.000+07:00",
"initialQuota": "80.00",
"initialQuotaFormat": "01:20:00",
"itemId": "13699117",
"lastCallDate": "1960-01-01T19:50:00.000+07:00",
"offer": {
"code": "15835629",
"engBillDescription": "5G Super Max Speed Plus 1399",
"name": "PRORES09",
"socType": "U",
"thaiBillDescription": "5G Super Max Speed Plus 1399"
},
"offerInstance": 710065476,
"remainingQuota": 80.00,
"remainingQuotaFormat": "01:20:00",
"roundedInitialQuota": 80.00,
"roundedInitialQuotaFormat": "01:20:00",
"serviceType": "Voice",
"uom": {
"code": "M",
"description": "Minutes"
},
"utilizedQuota": 0.00,
"utilizedQuotaFormat": "00:00:00"
}
],
"size": 3
},
"ccpBucketBalanceList": null,
"classify": "R",
"ouBundleList": null,
"sbmBundleList": null,
"system": "CCBS"
}
res.status(200).send(response)
}
|