develop #38

Merged
bboterm merged 451 commits from develop into main 2025-11-19 14:28:14 +00:00
Showing only changes of commit 9fd0a14e91 - Show all commits

View File

@ -100,8 +100,8 @@ public class ABTProductsPUTGenerator {
((ObjectNode)newJsonNode).putRawValue("customerSegmentIds", null); ((ObjectNode)newJsonNode).putRawValue("customerSegmentIds", null);
} }
case "allowedGboAgeProfiles" -> { case "allowedGboAgeProfiles" -> {
LOGGER.info("Rewriting null allowedGboAgeProfiles to allowedGboAgeProfilesIds..."); LOGGER.info("Rewriting null allowedGboAgeProfiles to allowedGboAgeProfileIds...");
((ObjectNode)newJsonNode).putRawValue("allowedGboAgeProfilesIds", null); ((ObjectNode)newJsonNode).putRawValue("allowedGboAgeProfileIds", null);
} }
case "mandatoryCustomerDataItems" -> { case "mandatoryCustomerDataItems" -> {
LOGGER.info("Rewriting null mandatoryCustomerDataItems to mandatoryCustomerDataItemIds..."); LOGGER.info("Rewriting null mandatoryCustomerDataItems to mandatoryCustomerDataItemIds...");
@ -283,7 +283,8 @@ public class ABTProductsPUTGenerator {
((ObjectNode)sellingPeriod).putRawValue("forbiddenPaymentMethodIds", null); ((ObjectNode)sellingPeriod).putRawValue("forbiddenPaymentMethodIds", null);
} }
} }
if (sellingPeriod.get("sellingPrices") != null) { if (!sellingPeriod.get("sellingPrices").isNull()) {
LOGGER.info("Deep-copying sellingPrices...");
ArrayNode sellingPrices = ((ArrayNode)sellingPeriod.get("sellingPrices")).deepCopy(); ArrayNode sellingPrices = ((ArrayNode)sellingPeriod.get("sellingPrices")).deepCopy();
((ObjectNode)sellingPeriod).remove("sellingPrices"); ((ObjectNode)sellingPeriod).remove("sellingPrices");
if (!sellingPrices.isEmpty()) { if (!sellingPrices.isEmpty()) {
@ -299,8 +300,8 @@ public class ABTProductsPUTGenerator {
} }
} }
case "purchasePrices" -> { case "purchasePrices" -> {
LOGGER.info("Rewriting taxMetadata in purchasePrices to taxMetadataId..."); LOGGER.info("Deep-copying purchasePrices...");
if (jsonField.getValue() != null) { if (!jsonField.getValue().isNull()) {
ArrayNode purchasePrices = ((ArrayNode)jsonField.getValue()).deepCopy(); ArrayNode purchasePrices = ((ArrayNode)jsonField.getValue()).deepCopy();
((ObjectNode)newJsonNode).putArray("purchasePrices").addAll(purchasePrices); ((ObjectNode)newJsonNode).putArray("purchasePrices").addAll(purchasePrices);
} else { } else {