develop #38
@ -100,8 +100,8 @@ public class ABTProductsPUTGenerator {
|
||||
((ObjectNode)newJsonNode).putRawValue("customerSegmentIds", null);
|
||||
}
|
||||
case "allowedGboAgeProfiles" -> {
|
||||
LOGGER.info("Rewriting null allowedGboAgeProfiles to allowedGboAgeProfilesIds...");
|
||||
((ObjectNode)newJsonNode).putRawValue("allowedGboAgeProfilesIds", null);
|
||||
LOGGER.info("Rewriting null allowedGboAgeProfiles to allowedGboAgeProfileIds...");
|
||||
((ObjectNode)newJsonNode).putRawValue("allowedGboAgeProfileIds", null);
|
||||
}
|
||||
case "mandatoryCustomerDataItems" -> {
|
||||
LOGGER.info("Rewriting null mandatoryCustomerDataItems to mandatoryCustomerDataItemIds...");
|
||||
@ -283,7 +283,8 @@ public class ABTProductsPUTGenerator {
|
||||
((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();
|
||||
((ObjectNode)sellingPeriod).remove("sellingPrices");
|
||||
if (!sellingPrices.isEmpty()) {
|
||||
@ -299,8 +300,8 @@ public class ABTProductsPUTGenerator {
|
||||
}
|
||||
}
|
||||
case "purchasePrices" -> {
|
||||
LOGGER.info("Rewriting taxMetadata in purchasePrices to taxMetadataId...");
|
||||
if (jsonField.getValue() != null) {
|
||||
LOGGER.info("Deep-copying purchasePrices...");
|
||||
if (!jsonField.getValue().isNull()) {
|
||||
ArrayNode purchasePrices = ((ArrayNode)jsonField.getValue()).deepCopy();
|
||||
((ObjectNode)newJsonNode).putArray("purchasePrices").addAll(purchasePrices);
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user