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

Rubicon: pass imp[].ext.tid #3648

Merged
merged 3 commits into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading