Skip to content

Commit 78b5ac7

Browse files
AntoxaAntoxicRitesh Ghodrao
authored andcommitted
Bid Ranking (prebid#3977)
1 parent 7871591 commit 78b5ac7

13 files changed

Lines changed: 889 additions & 129 deletions

File tree

src/main/java/org/prebid/server/auction/BidResponseCreator.java

Lines changed: 79 additions & 85 deletions
Large diffs are not rendered by default.

src/main/java/org/prebid/server/auction/model/BidInfo.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ public class BidInfo {
3737

3838
Integer vastTtl;
3939

40+
Integer rank;
41+
4042
public String getBidId() {
4143
final ObjectNode extNode = bid != null ? bid.getExt() : null;
4244
final JsonNode bidIdNode = extNode != null ? extNode.path("prebid").path("bidid") : null;

src/main/java/org/prebid/server/auction/model/TargetingInfo.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,5 @@ public class TargetingInfo {
1515

1616
boolean isWinningBid;
1717

18-
boolean isBidderWinningBid;
19-
2018
boolean isAddTargetBidderCode;
2119
}

src/main/java/org/prebid/server/proto/openrtb/ext/response/ExtBidPrebid.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,6 @@ public class ExtBidPrebid {
4040

4141
@JsonProperty("passthrough")
4242
JsonNode passThrough;
43+
44+
Integer rank;
4345
}

src/main/java/org/prebid/server/settings/model/AccountAuctionConfig.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,6 @@ public class AccountAuctionConfig {
5858
PaaFormat paaFormat;
5959

6060
AccountCacheConfig cache;
61+
62+
AccountBidRankingConfig ranking;
6163
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package org.prebid.server.settings.model;
2+
3+
import lombok.Value;
4+
5+
@Value(staticConstructor = "of")
6+
public class AccountBidRankingConfig {
7+
8+
Boolean enabled;
9+
}

src/test/groovy/org/prebid/server/functional/model/config/AccountAuctionConfig.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class AccountAuctionConfig {
2424
AccountBidValidationConfig bidValidations
2525
AccountEventsConfig events
2626
AccountCacheConfig cache
27+
AccountRankingConfig ranking
2728
AccountPriceFloorsConfig priceFloors
2829
Targeting targeting
2930
PaaFormat paaformat
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package org.prebid.server.functional.model.config
2+
3+
import groovy.transform.ToString
4+
5+
@ToString(includeNames = true, ignoreNulls = true)
6+
class AccountRankingConfig {
7+
8+
Boolean enabled
9+
}

src/test/groovy/org/prebid/server/functional/model/response/auction/Bid.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class Bid implements ObjectMapperWrapper {
7272
}
7373
}
7474

75-
static List<Bid> getDefaultMultyTypesBids(Imp imp, @DelegatesTo(Bid) Closure commonInit = null) {
75+
static List<Bid> getDefaultMultiTypesBids(Imp imp, @DelegatesTo(Bid) Closure commonInit = null) {
7676
List<Bid> bids = []
7777
if (imp.banner) bids << createBid(imp, BidMediaType.BANNER) { adm = null }
7878
if (imp.video) bids << createBid(imp, BidMediaType.VIDEO)

src/test/groovy/org/prebid/server/functional/model/response/auction/Prebid.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ class Prebid {
1515
Meta meta
1616
Map passThrough
1717
Video storedRequestAttributes
18+
Integer rank
1819
}

0 commit comments

Comments
 (0)