diff --git a/src/java/ABTProductsPUTGenerator/bin/ABTProductsPUTGenerator.jar b/src/java/ABTProductsPUTGenerator/bin/ABTProductsPUTGenerator.jar index eb23d37..d36d6ec 100644 Binary files a/src/java/ABTProductsPUTGenerator/bin/ABTProductsPUTGenerator.jar and b/src/java/ABTProductsPUTGenerator/bin/ABTProductsPUTGenerator.jar differ diff --git a/src/java/ABTProductsPUTGenerator/src/main/java/nl/htm/ovpay/abt/ABTProductsPUTGenerator.java b/src/java/ABTProductsPUTGenerator/src/main/java/nl/htm/ovpay/abt/ABTProductsPUTGenerator.java index 69426ac..b2910d3 100644 --- a/src/java/ABTProductsPUTGenerator/src/main/java/nl/htm/ovpay/abt/ABTProductsPUTGenerator.java +++ b/src/java/ABTProductsPUTGenerator/src/main/java/nl/htm/ovpay/abt/ABTProductsPUTGenerator.java @@ -91,6 +91,26 @@ public class ABTProductsPUTGenerator { private static void checkRewriteNullFields(Map.Entry jsonField, JsonNode newJsonNode) { switch (jsonField.getKey()) { + case "productOwner" -> { + LOGGER.info("Rewriting null productOwner to productOwnerId..."); + ((ObjectNode)newJsonNode).putRawValue("productOwnerId", null); + } + case "productCategory" -> { + LOGGER.info("Rewriting null productCategory to productCategoryId..."); + ((ObjectNode)newJsonNode).putRawValue("productCategoryId", null); + } + case "paymentMoment" -> { + LOGGER.info("Rewriting null paymentMoment to paymentMomentId..."); + ((ObjectNode)newJsonNode).putRawValue("paymentMomentId", null); + } + case "requiredCustomerLevel" -> { + LOGGER.info("Rewriting null requiredCustomerLevel to requiredCustomerLevelId..."); + ((ObjectNode)newJsonNode).putRawValue("requiredCustomerLevelId", null); + } + case "layerInfo" -> { + LOGGER.info("Rewriting null layerInfo to layerInfoId..."); + ((ObjectNode)newJsonNode).putRawValue("layerInfoId", null); + } case "marketSegments" -> { LOGGER.info("Rewriting null marketSegments to marketSegmentIds..."); ((ObjectNode)newJsonNode).putRawValue("marketSegmentIds", null); @@ -148,6 +168,11 @@ public class ABTProductsPUTGenerator { Long requiredCustomerLevelId = jsonField.getValue().get("requiredCustomerLevelId").asLong(); ((ObjectNode)newJsonNode).put("requiredCustomerLevelId", requiredCustomerLevelId); } + case "layerInfo" -> { + LOGGER.info("Rewriting layerInfo to layerInfoId..."); + Long layerInfoId = jsonField.getValue().get("layerInfoId").asLong(); + ((ObjectNode)newJsonNode).put("layerInfoId", layerInfoId); + } } }