sysone-api-mapper 1.0.102 → 1.0.104
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -22,7 +22,9 @@ import {
|
|
|
22
22
|
getPolicyDetail_CNP,
|
|
23
23
|
getPolicyIndividualDetail_Request,
|
|
24
24
|
getPolicyDetail_Request,
|
|
25
|
-
postInsureds_CNP
|
|
25
|
+
postInsureds_CNP,
|
|
26
|
+
getPolicyCollection_Request,
|
|
27
|
+
getPolicyCollection
|
|
26
28
|
} from "./modules/policy";
|
|
27
29
|
import {
|
|
28
30
|
getActivityList,
|
|
@@ -427,6 +429,21 @@ const policyModule = {
|
|
|
427
429
|
},
|
|
428
430
|
},
|
|
429
431
|
|
|
432
|
+
GET_COLLECTIONS: {
|
|
433
|
+
default: {
|
|
434
|
+
url: '/policy/v1/policies/{0}/collections',
|
|
435
|
+
method: methods.GET,
|
|
436
|
+
requestMapper: (request) => ({ mappedParams: request }),
|
|
437
|
+
responseMapper: (response) => response.data,
|
|
438
|
+
},
|
|
439
|
+
cnp: {
|
|
440
|
+
url: 'policy/v1/policy-individual/{0}/{1}/detail',
|
|
441
|
+
method: methods.GET,
|
|
442
|
+
requestMapper: request => ({ mappedParams: getPolicyCollection_Request(request) }),
|
|
443
|
+
responseMapper: (response) => getPolicyCollection(response.data)
|
|
444
|
+
},
|
|
445
|
+
},
|
|
446
|
+
|
|
430
447
|
GET_POLICY_HOME_COLLECTIVE_DETAIL: {
|
|
431
448
|
default: {
|
|
432
449
|
url: 'policy-home/v1/policies/{0}/details',
|
|
@@ -182,7 +182,6 @@ const getPolicyDetail_CNP = async (data) => {
|
|
|
182
182
|
]
|
|
183
183
|
},
|
|
184
184
|
collectionData: {
|
|
185
|
-
paymentFrequency: '',
|
|
186
185
|
paymentMethodData: {
|
|
187
186
|
simpleMethodData: {
|
|
188
187
|
number: data.paymentMethod.number,
|
|
@@ -275,6 +274,23 @@ const getPolicyDetail_CNP = async (data) => {
|
|
|
275
274
|
return objectMapped;
|
|
276
275
|
}
|
|
277
276
|
|
|
277
|
+
const getPolicyCollection = async (data) => {
|
|
278
|
+
const objectMapped = {
|
|
279
|
+
billingForm: {},
|
|
280
|
+
holderDistribution: null,
|
|
281
|
+
insuredDistribution: null,
|
|
282
|
+
paymentFrecuency: data.paymentMethod.periodicity,
|
|
283
|
+
paymentMethodData: {
|
|
284
|
+
simpleMethodData: {
|
|
285
|
+
number: data.paymentMethod.number,
|
|
286
|
+
type: data.paymentMethod.type,
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
|
|
290
|
+
}
|
|
291
|
+
return objectMapped;
|
|
292
|
+
}
|
|
293
|
+
|
|
278
294
|
const getPolicyCollectiveDetail_CNP = async (response) => {
|
|
279
295
|
const objectMapped = {
|
|
280
296
|
policyData: {
|
|
@@ -533,6 +549,10 @@ const getPolicyDetail_Request = (inputParams) => {
|
|
|
533
549
|
return {
|
|
534
550
|
}
|
|
535
551
|
}
|
|
552
|
+
const getPolicyCollection_Request = (inputParams) => {
|
|
553
|
+
return {
|
|
554
|
+
}
|
|
555
|
+
}
|
|
536
556
|
const getPolicyCollectiveDetail_Request = (inputParams) => {
|
|
537
557
|
return {
|
|
538
558
|
}
|
|
@@ -555,6 +575,8 @@ export {
|
|
|
555
575
|
getPolicyCollectiveDetail_CNP,
|
|
556
576
|
getPolicyCollectiveDetail_Request,
|
|
557
577
|
getPolicyIndividualDetail_Request,
|
|
578
|
+
getPolicyCollection_Request,
|
|
558
579
|
getEndorsements_Request,
|
|
559
|
-
getPolicyDetail_Request
|
|
580
|
+
getPolicyDetail_Request,
|
|
581
|
+
getPolicyCollection
|
|
560
582
|
}
|