Skip to content
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

Add support for CPM override in Rubicon bidder #733

Merged
merged 4 commits into from
Jul 30, 2020

Conversation

rpanchyk
Copy link
Contributor

@rpanchyk rpanchyk commented May 25, 2020

Implements prebid/prebid-server#1289

- when ext.prebid.bidders.rubicon.debug.cpmoverride is present, 
        all Rubicon bids have the supplied value

- when imp[].ext.prebid.rubicon.debug.cpmoverride is present, 
        that bid gets the supplied value

@rpanchyk rpanchyk requested a review from DGarbar May 25, 2020 10:44
@@ -773,9 +787,45 @@ private Bid updateBid(Bid bid, BidResponse bidResponse) {
// copy bidResponse.bidid to openrtb_response.seatbid.bid.id
bid.setId(bidResponse.getBidid());
}

final Float cpmOverride = ObjectUtils.defaultIfNull(cpmOverrideFromImp(imp), cmpOverrideFromRequest);
if (cpmOverride != null) {
Copy link
Contributor

@DGarbar DGarbar May 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Go they set price if it is more than zero, but probably it is bc they don't have nill.
But probably it is better to check, bc in this case, cpmOvveride can override normal price. (corner case)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, added comment Unconditionally set price if coming from CPM override.

DGarbar
DGarbar previously approved these changes May 25, 2020
rpanchyk added 2 commits July 30, 2020 16:20
# Conflicts:
#	docs/pbs-java-and-go-features-review.md
#	src/main/java/org/prebid/server/auction/ExchangeService.java
#	src/main/java/org/prebid/server/bidder/rubicon/RubiconBidder.java
#	src/test/java/org/prebid/server/bidder/rubicon/RubiconBidderTest.java
@rpanchyk rpanchyk merged commit 3e3503f into master Jul 30, 2020
@rpanchyk rpanchyk deleted the add-support-for-cpmoverride branch July 30, 2020 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants