-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not overwrite itemDetails for invoice tax items which contains some value there #44
Conversation
public TaxItemDetails(@Nonnull final Double taxRate, @Nullable final UsageConsumableInArrearAggregate usageDetail) { | ||
this(taxRate, usageDetail != null ? usageDetail.getTierDetails() : null, usageDetail != null ? usageDetail.getAmount() : null); | ||
} | ||
|
||
@JsonCreator | ||
public TaxItemDetails(@JsonProperty("taxRate") final Double taxRate, | ||
@JsonProperty("tierDetails") List<UsageConsumableInArrearTierUnitAggregate> tierDetails, | ||
@JsonProperty("amount") BigDecimal amount) { | ||
this.tierDetails = tierDetails; | ||
this.amount = amount; | ||
this.taxRate = taxRate; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if Killbill adds more details than just tiers and amount. itemDetails is a json string ( it could contain any information not just tiers/amount). Can't we do something like below without even having to use object TaxItemDetails for the same.
ObjectMapper mapper = new ObjectMapper();
JsonNode actualObj = mapper. readTree(itemDetails);
((ObjectNode) actualObj).put("taxRate", 1.0);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's great suggestion 👍, I didn't like the way how vertex plugin became exposed to invoice module implementation details of KB and it's specific version defined in pom.xml, missed this simple approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in 028ba4a
…rsion without vulnerability
pom.xml
Outdated
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-databind</artifactId> | ||
<version>2.13.4.1</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
had to update jackson-annotations and jackson-core to be compatible (as to upperBind version enforcements warning)
This PR -