sysone-api-mapper 1.0.46 → 1.0.48
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
|
@@ -191,7 +191,7 @@ export const tenantsConfig = {
|
|
|
191
191
|
},
|
|
192
192
|
GET_MONETARY_GOALS: {
|
|
193
193
|
cnp: {
|
|
194
|
-
url: 'party/v1/monetary-goals',
|
|
194
|
+
url: 'party/v1/products/{0}/monetary-goals',
|
|
195
195
|
method: methods.GET,
|
|
196
196
|
source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-monetary-goals",
|
|
197
197
|
requestMapper: request => ({ mappedParams: request }),
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { mapPaymentFrequency, mapProductCode } from "../../helpers/mappingHelpers";
|
|
2
2
|
|
|
3
3
|
export const getQuotationsList = async (response) => {
|
|
4
|
-
const
|
|
5
|
-
|
|
4
|
+
const quotations = Array.isArray(response?.quotations)
|
|
5
|
+
? response.quotations.map(q => ({
|
|
6
6
|
code: q.code || null,
|
|
7
7
|
creationDate: q.creationDate || null,
|
|
8
8
|
email: q.email || null,
|
|
9
9
|
expirationDate: q.expirationDate || null,
|
|
10
10
|
number: q.number || null,
|
|
11
11
|
paymentFrequency: {
|
|
12
|
-
name: q.paymentFrequency
|
|
13
|
-
code: q.paymentFrequency
|
|
12
|
+
name: q.paymentFrequency?.name || null,
|
|
13
|
+
code: q.paymentFrequency?.code || null,
|
|
14
14
|
},
|
|
15
15
|
product: {
|
|
16
|
-
code: q.product?.code
|
|
17
|
-
name: q.product?.name,
|
|
16
|
+
code: q.product?.code?.toString() || null,
|
|
17
|
+
name: q.product?.name || null,
|
|
18
18
|
subsection: {
|
|
19
19
|
code: q.product?.subsection?.code || null,
|
|
20
20
|
name: q.product?.subsection?.name || null,
|
|
@@ -26,13 +26,18 @@ export const getQuotationsList = async (response) => {
|
|
|
26
26
|
version: q.product?.version || 0,
|
|
27
27
|
},
|
|
28
28
|
status: {
|
|
29
|
-
code: q.status
|
|
30
|
-
name: q.status
|
|
29
|
+
code: q.status?.code || null,
|
|
30
|
+
name: q.status?.name || null,
|
|
31
31
|
},
|
|
32
|
-
}))
|
|
33
|
-
|
|
32
|
+
}))
|
|
33
|
+
: [];
|
|
34
|
+
|
|
35
|
+
const total = response?.total ? response.total : 0;
|
|
36
|
+
|
|
37
|
+
return {
|
|
38
|
+
quotations,
|
|
39
|
+
total,
|
|
34
40
|
};
|
|
35
|
-
return objectMapped;
|
|
36
41
|
};
|
|
37
42
|
|
|
38
43
|
export const getQuotationByCode = async (response) => {
|