sysone-api-mapper 1.0.116 → 1.0.118
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
|
@@ -96,6 +96,20 @@ const billingModule = {
|
|
|
96
96
|
responseMapper: (response) => getBillingsResponse(response.data),
|
|
97
97
|
},
|
|
98
98
|
},
|
|
99
|
+
GET_POLICY_COLLECTIONS: {
|
|
100
|
+
default: {
|
|
101
|
+
url: '/collection/v1/collections',
|
|
102
|
+
method: methods.GET,
|
|
103
|
+
requestMapper: (request) => ({ mappedParams: request }),
|
|
104
|
+
responseMapper: (response) => response.data,
|
|
105
|
+
},
|
|
106
|
+
cnp: {
|
|
107
|
+
url: 'policy/v1/policy/{0}/{1}/payments',
|
|
108
|
+
method: methods.GET,
|
|
109
|
+
requestMapper: request => ({ mappedParams: getBillingsParams(request) }),
|
|
110
|
+
responseMapper: (response) => getBillingsResponse(response.data),
|
|
111
|
+
},
|
|
112
|
+
},
|
|
99
113
|
|
|
100
114
|
GET_BILLING_TYPE: {
|
|
101
115
|
default: {
|
|
@@ -105,7 +119,7 @@ const billingModule = {
|
|
|
105
119
|
responseMapper: (response) => response.data,
|
|
106
120
|
},
|
|
107
121
|
cnp: {
|
|
108
|
-
url: '
|
|
122
|
+
url: 'party/v1/genders',
|
|
109
123
|
method: methods.GET,
|
|
110
124
|
requestMapper: request => ({ mappedParams: request }),
|
|
111
125
|
responseMapper: (response) => getBillingTypeResponse(response.data),
|
|
@@ -10,7 +10,7 @@ export const getBillingsResponse = (data) => {
|
|
|
10
10
|
code: `${index + 1}-${pIndex + 1}`, // No tiene código propio, uso el index + 1
|
|
11
11
|
billingNumber: payment.installmentNumber,
|
|
12
12
|
billingDate: payment.paymentDate,
|
|
13
|
-
billingExpirationDate: payment.
|
|
13
|
+
billingExpirationDate: payment.expiration ?? payment.expirationDate,
|
|
14
14
|
totalAmount: payment.amount,
|
|
15
15
|
remainingAmount: payment.debt,
|
|
16
16
|
paymentStatus: {
|
|
@@ -23,10 +23,13 @@ export const getBillingsResponse = (data) => {
|
|
|
23
23
|
billingValuesGrouping: [
|
|
24
24
|
{
|
|
25
25
|
type: { name: "Prima", code: "PRIME" },
|
|
26
|
-
value: payment.amount // ----- SOLO LLEGA LA PRIMA
|
|
26
|
+
value: payment.amount // ----- SOLO LLEGA LA PRIMA
|
|
27
27
|
}
|
|
28
28
|
],
|
|
29
|
-
type: {
|
|
29
|
+
type: {
|
|
30
|
+
name: "Factura",
|
|
31
|
+
code: "INVOICE",
|
|
32
|
+
},
|
|
30
33
|
subtype: {},
|
|
31
34
|
exchangeRate: null,
|
|
32
35
|
billingDateFrom: "N/A",
|
|
@@ -42,7 +45,7 @@ export const getBillingsResponse = (data) => {
|
|
|
42
45
|
};
|
|
43
46
|
|
|
44
47
|
|
|
45
|
-
export const getBillingTypeResponse = (
|
|
48
|
+
export const getBillingTypeResponse = () => {
|
|
46
49
|
return {
|
|
47
50
|
types: [
|
|
48
51
|
{
|