Skip to content

Commit

Permalink
fix(sdk): added price negative checking for quote (#211)
Browse files Browse the repository at this point in the history
  • Loading branch information
xuelianhan007 authored Nov 20, 2024
1 parent 65c01ea commit d31eec6
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"product": "${mefRequestBody.quoteItem[0].product}",
"action": "add",
"id": "${mefRequestBody.quoteItem[0].id}",
"state": "((mefResponseBody.quoteItem[0].quoteItemPrice[0].price.dutyFreeAmount.value==''?'unableToProvide':'approved.orderable'))",
"state": "(((mefResponseBody.quoteItem[0].quoteItemPrice[0].price.dutyFreeAmount.value=='')or(T(java.lang.Double).parseDouble(mefResponseBody.quoteItem[0].quoteItemPrice[0].price.dutyFreeAmount.value)<0)?'unableToProvide':'approved.orderable'))",
"quoteItemTerm": "${T(java.util.Arrays).asList(mefRequestBody.quoteItem[0].requestedQuoteItemTerm)}",
"quoteItemPrice": [
{
Expand Down Expand Up @@ -37,5 +37,5 @@
"instantSyncQuote": "${mefRequestBody[instantSyncQuote]?:''}",
"requestedQuoteCompletionDate": "${mefRequestBody[requestedQuoteCompletionDate]?:''}",
"quoteLevel": "${mefRequestBody.buyerRequestedQuoteLevel}",
"state": "((mefResponseBody.quoteItem[0].quoteItemPrice[0].price.dutyFreeAmount.value==''?'unableToProvide':'approved.orderable'))"
"state": "(((mefResponseBody.quoteItem[0].quoteItemPrice[0].price.dutyFreeAmount.value=='')or(T(java.lang.Double).parseDouble(mefResponseBody.quoteItem[0].quoteItemPrice[0].price.dutyFreeAmount.value)<0)?'unableToProvide':'approved.orderable'))"
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
"product": "${mefRequestBody.quoteItem[0].product}",
"action": "add",
"id": "${mefRequestBody.quoteItem[0].id}",
"state": "((mefResponseBody.quoteItem[0].quoteItemPrice[0].price.dutyFreeAmount.value == '' ? 'unableToProvide': 'approved.orderable'))",
"state": "(((mefResponseBody.quoteItem[0].quoteItemPrice[0].price.dutyFreeAmount.value == '') or (T(java.lang.Double).parseDouble(mefResponseBody.quoteItem[0].quoteItemPrice[0].price.dutyFreeAmount.value) < 0)? 'unableToProvide': 'approved.orderable'))",
"quoteItemTerm": "${T(java.util.Arrays).asList(mefRequestBody.quoteItem[0].requestedQuoteItemTerm)}",
"quoteItemPrice": [{
"unitOfMeasure":"",
Expand All @@ -57,5 +57,5 @@ spec:
"instantSyncQuote":"${mefRequestBody[instantSyncQuote]?:''}",
"requestedQuoteCompletionDate": "${mefRequestBody[requestedQuoteCompletionDate]?:''}",
"quoteLevel": "${mefRequestBody.buyerRequestedQuoteLevel}",
"state": "((mefResponseBody.quoteItem[0].quoteItemPrice[0].price.dutyFreeAmount.value == '' ? 'unableToProvide': 'approved.orderable'))"
"state": "(((mefResponseBody.quoteItem[0].quoteItemPrice[0].price.dutyFreeAmount.value == '') or (T(java.lang.Double).parseDouble(mefResponseBody.quoteItem[0].quoteItemPrice[0].price.dutyFreeAmount.value) < 0)? 'unableToProvide': 'approved.orderable'))"
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
"product": "${mefRequestBody.quoteItem[0].product}",
"action": "add",
"id": "${mefRequestBody.quoteItem[0].id}",
"state": "((mefResponseBody.quoteItem[0].quoteItemPrice[0].price.dutyFreeAmount.value == '' ? 'unableToProvide': 'approved.orderable'))",
"state": "(((mefResponseBody.quoteItem[0].quoteItemPrice[0].price.dutyFreeAmount.value == '') or (T(java.lang.Double).parseDouble(mefResponseBody.quoteItem[0].quoteItemPrice[0].price.dutyFreeAmount.value) < 0)? 'unableToProvide': 'approved.orderable'))",
"quoteItemTerm": "${T(java.util.Arrays).asList(mefRequestBody.quoteItem[0].requestedQuoteItemTerm)}",
"quoteItemPrice": [{
"unitOfMeasure":"",
Expand All @@ -60,5 +60,5 @@ spec:
"instantSyncQuote":"${mefRequestBody[instantSyncQuote]?:''}",
"requestedQuoteCompletionDate": "${mefRequestBody[requestedQuoteCompletionDate]?:''}",
"quoteLevel": "${mefRequestBody.buyerRequestedQuoteLevel}",
"state": "((mefResponseBody.quoteItem[0].quoteItemPrice[0].price.dutyFreeAmount.value == '' ? 'unableToProvide': 'approved.orderable'))"
"state": "(((mefResponseBody.quoteItem[0].quoteItemPrice[0].price.dutyFreeAmount.value == '') or (T(java.lang.Double).parseDouble(mefResponseBody.quoteItem[0].quoteItemPrice[0].price.dutyFreeAmount.value) < 0)? 'unableToProvide': 'approved.orderable'))"
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
"product": "${mefRequestBody.quoteItem[0].product}",
"action": "add",
"id": "${mefRequestBody.quoteItem[0].id}",
"state": "((mefResponseBody.quoteItem[0].quoteItemPrice[0].price.dutyFreeAmount.value == '' ? 'unableToProvide': 'approved.orderable'))",
"state": "(((mefResponseBody.quoteItem[0].quoteItemPrice[0].price.dutyFreeAmount.value == '') or (T(java.lang.Double).parseDouble(mefResponseBody.quoteItem[0].quoteItemPrice[0].price.dutyFreeAmount.value) < 0)? 'unableToProvide': 'approved.orderable'))",
"quoteItemTerm": "${T(java.util.Arrays).asList(mefRequestBody.quoteItem[0].requestedQuoteItemTerm)}",
"quoteItemPrice": [{
"unitOfMeasure":"",
Expand All @@ -57,5 +57,5 @@ spec:
"instantSyncQuote":"${mefRequestBody[instantSyncQuote]?:''}",
"requestedQuoteCompletionDate": "${mefRequestBody[requestedQuoteCompletionDate]?:''}",
"quoteLevel": "${mefRequestBody.buyerRequestedQuoteLevel}",
"state": "((mefResponseBody.quoteItem[0].quoteItemPrice[0].price.dutyFreeAmount.value == '' ? 'unableToProvide': 'approved.orderable'))"
"state": "(((mefResponseBody.quoteItem[0].quoteItemPrice[0].price.dutyFreeAmount.value == '') or (T(java.lang.Double).parseDouble(mefResponseBody.quoteItem[0].quoteItemPrice[0].price.dutyFreeAmount.value) < 0)? 'unableToProvide': 'approved.orderable'))"
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
"product": "${mefRequestBody.quoteItem[0].product}",
"action": "add",
"id": "${mefRequestBody.quoteItem[0].id}",
"state": "((mefResponseBody.quoteItem[0].quoteItemPrice[0].price.dutyFreeAmount.value == '' ? 'unableToProvide': 'approved.orderable'))",
"state": "(((mefResponseBody.quoteItem[0].quoteItemPrice[0].price.dutyFreeAmount.value == '') or (T(java.lang.Double).parseDouble(mefResponseBody.quoteItem[0].quoteItemPrice[0].price.dutyFreeAmount.value) < 0)? 'unableToProvide': 'approved.orderable'))",
"quoteItemTerm": "${T(java.util.Arrays).asList(mefRequestBody.quoteItem[0].requestedQuoteItemTerm)}",
"quoteItemPrice": [{
"unitOfMeasure":"",
Expand All @@ -60,5 +60,5 @@ spec:
"instantSyncQuote":"${mefRequestBody[instantSyncQuote]?:''}",
"requestedQuoteCompletionDate": "${mefRequestBody[requestedQuoteCompletionDate]?:''}",
"quoteLevel": "${mefRequestBody.buyerRequestedQuoteLevel}",
"state": "((mefResponseBody.quoteItem[0].quoteItemPrice[0].price.dutyFreeAmount.value == '' ? 'unableToProvide': 'approved.orderable'))"
"state": "(((mefResponseBody.quoteItem[0].quoteItemPrice[0].price.dutyFreeAmount.value == '') or (T(java.lang.Double).parseDouble(mefResponseBody.quoteItem[0].quoteItemPrice[0].price.dutyFreeAmount.value) < 0)? 'unableToProvide': 'approved.orderable'))"
}
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ spec:
- classpath:/mef-sonata/mapping-matrix/mapping.matrix.inventory.eline.read.yaml
- classpath:/mef-sonata/mapping-matrix/mapping.matrix.inventory.uni.list.yaml
- classpath:/mef-sonata/mapping-matrix/mapping.matrix.inventory.eline.list.yaml
- classpath:/mef-sonata/template-upgrade/release.1.5.16.yaml
- classpath:/mef-sonata/template-upgrade/release.1.5.17.yaml


templateUpgradePaths:
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
kind: kraken.product.template-upgrade
apiVersion: v1
metadata:
key: kraken.product.template-upgrade.1.5.17
name: V1.5.17
labels:
productSpec: grace
productVersion: V1.5.17
publishDate: 2024-11-20
description: |
Added negative validation for price value in quote list
version: 2
1 change: 0 additions & 1 deletion kraken-java-sdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<artifactId>kraken-java-sdk</artifactId>
<name>kraken-java-sdk</name>
<version>1.0.0-rc.0</version>

<packaging>pom</packaging>
<parent>
<groupId>com.consoleconnect.kraken</groupId>
Expand Down

0 comments on commit d31eec6

Please sign in to comment.