Skip to content
Open
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 @@ -215,6 +215,7 @@ private static BidType getBidType(Bid bid, List<BidderError> errors) {
return switch (bid.getMtype()) {
case 1 -> BidType.banner;
case 2 -> BidType.video;
case 3 -> BidType.audio;
case 4 -> BidType.xNative;
case null, default -> {
errors.add(BidderError.badServerResponse(
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/bidder-config/thetradedesk.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
adapters:
thetradedesk:
endpoint: https://direct.adsrvr.org/bid/bidder/{SupplyId}
ortb-version: "2.6"
aliases:
ttd:
meta-info:
Expand All @@ -10,10 +11,12 @@ adapters:
app-media-types:
- banner
- video
- audio
- native
site-media-types:
- banner
- video
- audio
- native
supported-vendors:
vendor-id: 21
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
import static org.assertj.core.api.Assertions.tuple;
import static org.prebid.server.proto.openrtb.ext.response.BidType.audio;
import static org.prebid.server.proto.openrtb.ext.response.BidType.banner;
import static org.prebid.server.proto.openrtb.ext.response.BidType.video;
import static org.prebid.server.proto.openrtb.ext.response.BidType.xNative;
Expand Down Expand Up @@ -429,6 +430,21 @@ public void makeBidsShouldReturnxNativeBid() throws JsonProcessingException {
.containsExactly(BidderBid.of(Bid.builder().impid("123").mtype(4).build(), xNative, "USD"));
}

@Test
public void makeBidsShouldReturnAudioBid() throws JsonProcessingException {
// given
final BidderCall<BidRequest> httpCall = givenHttpCall(
givenBidResponse(bidBuilder -> bidBuilder.mtype(3).impid("123")));

// when
final Result<List<BidderBid>> result = target.makeBids(httpCall, null);

// then
assertThat(result.getErrors()).isEmpty();
assertThat(result.getValue())
.containsExactly(BidderBid.of(Bid.builder().impid("123").mtype(3).build(), audio, "USD"));
}

@Test
public void makeBidsShouldReturnBannerBid() throws JsonProcessingException {
// given
Expand Down Expand Up @@ -483,7 +499,7 @@ public void makeBidsShouldReturnValidBidsAndErrorsForMixedMediaTypes() throws Js
.seatbid(singletonList(SeatBid.builder()
.bid(Arrays.asList(
Bid.builder().mtype(1).impid("valid1").build(), // valid banner
Bid.builder().mtype(3).impid("invalid1").build(), // invalid mtype
Bid.builder().mtype(5).impid("invalid1").build(), // invalid mtype
Bid.builder().mtype(2).impid("valid2").build(), // valid video
Bid.builder().mtype(null).impid("invalid2").build() // null mtype
))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
],
"tmax": 5000,
"regs": {
"ext": {
"gdpr": 0
}
"gdpr": 0
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@
"USD"
],
"regs": {
"ext": {
"gdpr": 0
}
"gdpr": 0
},
"ext": {
"prebid": {
Expand Down
Loading