Skip to content

Commit b890fef

Browse files
authored
33across: adapter maintenance (#4187)
1 parent 9d6e72a commit b890fef

File tree

4 files changed

+18
-44
lines changed

4 files changed

+18
-44
lines changed

src/main/java/org/prebid/server/bidder/thirtythreeacross/ThirtyThreeAcrossBidder.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -165,24 +165,13 @@ private static Video updatedVideo(Video video, String productId) {
165165

166166
return video.toBuilder()
167167
.startdelay(resolveStartDelay(video.getStartdelay(), productId))
168-
.placement(resolvePlacement(video.getPlacement(), productId))
169168
.build();
170169
}
171170

172171
private static Integer resolveStartDelay(Integer startDelay, String productId) {
173172
return Objects.equals(productId, "instream") ? Integer.valueOf(0) : startDelay;
174173
}
175174

176-
private static Integer resolvePlacement(Integer videoPlacement, String productId) {
177-
if (Objects.equals(productId, "instream")) {
178-
return 1;
179-
}
180-
if (BidderUtil.isNullOrZero(videoPlacement)) {
181-
return 2;
182-
}
183-
return videoPlacement;
184-
}
185-
186175
private static String getImpGroupName(ThirtyThreeAcrossImpExt impExt) {
187176
final ThirtyThreeAcrossImpExtTtx impExtTtx = impExt.getTtx();
188177
return impExtTtx.getProd() + impExtTtx.getZoneid();

src/main/resources/bidder-config/thirtythreeacross.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ adapters:
2020
usersync:
2121
cookie-family-name: 33across
2222
iframe:
23-
url: https://ssc-cms.33across.com/ps/?m=xch&rt=html&gdpr={{gdpr}}&gdpr_consent={{gdpr_consent}}&us_privacy={{us_privacy}}&id=zzz000000000002zzz&ru={{redirect_url}}
23+
url: https://ssc-cms.33across.com/ps/?m=xch&rt=html&gdpr={{gdpr}}&gdpr_consent={{gdpr_consent}}&us_privacy={{us_privacy}}&gpp={{gpp}}&gpp_sid={{gpp_sid}}&id=zzz000000000002zzz&ru={{redirect_url}}
2424
support-cors: false
2525
uid-macro: '33XUSERID33X'

src/main/resources/static/bidder-params/thirtythreeacross.json

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,25 @@
1010
},
1111
"siteId": {
1212
"type": "string",
13-
"description": "Site Id"
13+
"description": "[Deprecated use zoneId instead] Site Id"
1414
},
1515
"zoneId": {
1616
"type": "string",
1717
"description": "Zone Id"
1818
}
1919
},
20-
"required": [
21-
"productId",
22-
"siteId"
20+
"anyOf": [
21+
{
22+
"required": [
23+
"productId",
24+
"zoneId"
25+
]
26+
},
27+
{
28+
"required": [
29+
"productId",
30+
"siteId"
31+
]
32+
}
2333
]
2434
}

src/test/java/org/prebid/server/bidder/thirtythreeacross/ThirtyThreeAcrossBidderTest.java

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
import static java.util.function.UnaryOperator.identity;
3333
import static org.assertj.core.api.Assertions.assertThat;
3434
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
35-
import static org.assertj.core.api.Assertions.tuple;
3635
import static org.prebid.server.proto.openrtb.ext.response.BidType.banner;
3736
import static org.prebid.server.proto.openrtb.ext.response.BidType.video;
3837

@@ -196,30 +195,6 @@ public void makeHttpRequestsShouldReturnErrorIfVideoParamsNotPresent() {
196195
+ "protocols, mimes, playbackmethod"));
197196
}
198197

199-
@Test
200-
public void makeHttpRequestsShouldUpdateNotPresentPlacement() {
201-
// given
202-
final ExtPrebid<?, ExtImpThirtyThreeAcross> ext = ExtPrebid.of(null,
203-
ExtImpThirtyThreeAcross.of("11", null, "3"));
204-
final BidRequest bidRequest = BidRequest.builder()
205-
.imp(singletonList(givenImp(impBuilder -> impBuilder
206-
.video(validVideo())
207-
.ext(mapper.valueToTree(ext)))))
208-
.build();
209-
210-
// when
211-
final Result<List<HttpRequest<BidRequest>>> result = target.makeHttpRequests(bidRequest);
212-
213-
// then
214-
assertThat(result.getErrors()).isEmpty();
215-
assertThat(result.getValue())
216-
.extracting(HttpRequest::getPayload)
217-
.flatExtracting(BidRequest::getImp)
218-
.extracting(Imp::getVideo)
219-
.extracting(Video::getPlacement)
220-
.containsExactly(2);
221-
}
222-
223198
@Test
224199
public void makeHttpRequestsShouldNotUpdatePlacementWhenProductIdIsNotInstreamAndPlacementIsNotZero() {
225200
// given
@@ -245,7 +220,7 @@ public void makeHttpRequestsShouldNotUpdatePlacementWhenProductIdIsNotInstreamAn
245220
}
246221

247222
@Test
248-
public void makeHttpRequestsShouldUpdatePlacementAndStartDelayIfProdIsInstream() {
223+
public void makeHttpRequestsShouldUpdateStartDelayIfProdIsInstream() {
249224
// given
250225
final ExtPrebid<?, ExtImpThirtyThreeAcross> ext = ExtPrebid.of(null,
251226
ExtImpThirtyThreeAcross.of("11", null, "instream"));
@@ -264,8 +239,8 @@ public void makeHttpRequestsShouldUpdatePlacementAndStartDelayIfProdIsInstream()
264239
.extracting(HttpRequest::getPayload)
265240
.flatExtracting(BidRequest::getImp)
266241
.extracting(Imp::getVideo)
267-
.extracting(Video::getPlacement, Video::getStartdelay)
268-
.containsExactly(tuple(1, 0));
242+
.extracting(Video::getStartdelay)
243+
.containsExactly(0);
269244
}
270245

271246
@Test

0 commit comments

Comments
 (0)