Skip to content

Commit

Permalink
Rubicon: pass imp[].ext.tid (#3648)
Browse files Browse the repository at this point in the history
  • Loading branch information
Net-burst authored Dec 24, 2024
1 parent 19d25f3 commit 11f0eaa
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ public class RubiconBidder implements Bidder<BidRequest> {
private static final String FPD_KEYWORDS_FIELD = "keywords";
private static final String DFP_ADUNIT_CODE_FIELD = "dfp_ad_unit_code";
private static final String STYPE_FIELD = "stype";
private static final String TID_FIELD = "tid";
private static final String PREBID_EXT = "prebid";
private static final String PBS_LOGIN = "pbs_login";
private static final String PBS_VERSION = "pbs_version";
Expand Down Expand Up @@ -700,6 +701,7 @@ private RubiconImpExt makeImpExt(Imp imp,
.maxbids(getMaxBids(extRequest))
.gpid(getGpid(imp.getExt()))
.skadn(getSkadn(imp.getExt()))
.tid(getTid(imp.getExt()))
.prebid(rubiconImpExtPrebid)
.build();
}
Expand Down Expand Up @@ -947,6 +949,11 @@ private ObjectNode getSkadn(ObjectNode impExt) {
return skadnNode != null && skadnNode.isObject() ? (ObjectNode) skadnNode : null;
}

private String getTid(ObjectNode impExt) {
final JsonNode tidNode = impExt.get(TID_FIELD);
return tidNode != null && tidNode.isTextual() ? tidNode.asText() : null;
}

private String getAdSlot(Imp imp) {
final ObjectNode dataNode = toObjectNode(imp.getExt().get(FPD_DATA_FIELD));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,7 @@ public class RubiconImpExt {

ObjectNode skadn;

String tid;

RubiconImpExtPrebid prebid;
}
3 changes: 0 additions & 3 deletions src/test/java/org/prebid/server/it/OwnAdxTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
import io.restassured.response.Response;
import org.json.JSONException;
import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.prebid.server.model.Endpoint;
import org.springframework.test.context.junit4.SpringRunner;

import java.io.IOException;

Expand All @@ -16,7 +14,6 @@
import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
import static java.util.Collections.singletonList;

@RunWith(SpringRunner.class)
public class OwnAdxTest extends IntegrationTest {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"mint_version": ""
}
},
"maxbids": 1
"maxbids": 1,
"tid": "${json-unit.any-string}"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"mint_version": ""
}
},
"maxbids": 1
"maxbids": 1,
"tid": "${json-unit.any-string}"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"mint_version": ""
}
},
"maxbids": 1
"maxbids": 1,
"tid": "${json-unit.any-string}"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"mint_version": ""
}
},
"maxbids": 1
"maxbids": 1,
"tid": "${json-unit.any-string}"
}
}
],
Expand Down

0 comments on commit 11f0eaa

Please sign in to comment.