@lendi/act-credit-decisions-transform 2.0.8 → 2.0.12

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.
@@ -112,6 +112,18 @@ function transformLiability({ applicationId, id, liability }) {
112
112
  }
113
113
  }
114
114
  }
115
+ const newLimit = (0, lodash_1.get)(partialApplication, liabilityMapping.newLimit, 0);
116
+ // newLimit === 0, clearingFromOtherSource === 'PAYING_OUT'(clearing from other source == Yes), pay out using other funds
117
+ // newLimit === 0, clearingFromOtherSource is undefined, pay out using this application's funds
118
+ // newLimit !== 0, regardless what clearingFromOtherSource is(usually it is not present), continue to pay the liability
119
+ if (!newLimit) {
120
+ const clearingFromOtherSource = (0, lodash_1.get)(partialApplication, liabilityMapping.clearingFromOtherSource);
121
+ const clearingFromThisLoan = clearingFromOtherSource === lixi_internal_request_1.YesNoList.Yes ? lixi_internal_request_1.YesNoList.No : lixi_internal_request_1.YesNoList.Yes;
122
+ (0, lodash_1.set)(partialApplication, liabilityMapping.clearingFromThisLoan, clearingFromThisLoan);
123
+ }
124
+ else {
125
+ (0, lodash_1.set)(partialApplication, liabilityMapping.clearingFromThisLoan, lixi_internal_request_1.YesNoList.No);
126
+ }
115
127
  return partialApplication;
116
128
  }
117
129
  exports.transformLiability = transformLiability;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lendi/act-credit-decisions-transform",
3
- "version": "2.0.8",
3
+ "version": "2.0.12",
4
4
  "description": "Library for kafka event data transforming",
5
5
  "author": "Integrations <integrations@lendi.com.au>",
6
6
  "homepage": "https://bitbucket.org/lendi-dev/integrations-shared-packages#readme",
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "@lendi/integrations-credit-protocol": "1.18.8",
25
- "@lendi/act-eac-integrations-protocol": "3.1.0",
25
+ "@lendi/act-eac-integrations-protocol": "3.1.4",
26
26
  "clean-deep": "^3.4.0",
27
27
  "date-fns": "2.19.0",
28
28
  "lodash": "^4.17.15"