-
Notifications
You must be signed in to change notification settings - Fork 175
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
Implemented bid price adjustment #6
Conversation
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.
See comments.
return bidderCatalog.bidderRequesterByName(resolveBidder(bidder, aliases)) | ||
.requestBids(bidderRequest.getBidRequest(), timeout) | ||
.map(this::validateAndUpdateResponse) | ||
.map(seat -> ExchangeService.applyBidPriceAdjustment(seat, bidPriceAdjustmentFactor)) |
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.
No need for full qualifier
.map(seat -> applyBidPriceAdjustment(seat, bidPriceAdjustmentFactor))
|
||
validateAliases(aliases); | ||
final boolean isPrebidExtPresent = extRequestPrebid != null; |
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.
Do we need separate var for one time using?
|
||
for (Map.Entry<String, BigDecimal> bidderAdjustment : adjustmentFactors.entrySet()) { | ||
final String bidder = bidderAdjustment.getKey(); | ||
final BigDecimal adjustmentFactor = bidderAdjustment.getValue(); |
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.
Minor. We can move down adjustmentFactor before if(...)
statement.
} | ||
|
||
@Test | ||
public void shouldRequestBidsWithBidAdjustmentFactor() { |
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.
Duplicates shouldReturnBidsWithAdjustedPricesWhenAdjustmentFactorPresent
test.
final ValidationResult result = requestValidator.validate(bidRequest); | ||
|
||
// then | ||
assertThat(result.getErrors()).hasSize(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.
hasSize(0)
can be replaced with isEmpty()
. Check another places pls.
@jordillachmrf also took a look at these changes and is ok with them. |
Docker support & version logging
No description provided.