Skip to content

Commit

Permalink
Minor Bidders Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoxaAntoxic committed Sep 24, 2024
1 parent 22fb331 commit e246b13
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,18 @@ private ExtImpConnectAd parseImpExt(Imp imp) {
} catch (IllegalArgumentException e) {
throw new PreBidException("Impression id=%s, has invalid Ext".formatted(imp.getId()));
}
final Integer siteId = extImpConnectAd.getSiteId();
if (siteId == null || siteId == 0) {
final String siteId = extImpConnectAd.getSiteId();
if (siteId == null) {
throw new PreBidException("Impression id=%s, has no siteId present".formatted(imp.getId()));
}
return extImpConnectAd;
}

private Imp updateImp(Imp imp, Integer secure, Integer siteId, BigDecimal bidFloor) {
private Imp updateImp(Imp imp, Integer secure, String siteId, BigDecimal bidFloor) {
final boolean isValidBidFloor = BidderUtil.isValidPrice(bidFloor);
return imp.toBuilder()
.banner(updateBanner(imp.getBanner()))
.tagid(siteId.toString())
.tagid(siteId)
.secure(secure)
.bidfloor(isValidBidFloor ? bidFloor : imp.getBidfloor())
.bidfloorcur(isValidBidFloor ? "USD" : imp.getBidfloorcur())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
public class ExtImpConnectAd {

@JsonProperty("networkId")
Integer networkId;
String networkId;

@JsonProperty("siteId")
Integer siteId;
String siteId;

@JsonProperty("bidfloor")
BigDecimal bidFloor;
Expand Down
8 changes: 7 additions & 1 deletion src/main/resources/bidder-config/lemmadigital.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
adapters:
lemmadigital:
endpoint: https://sg.ads.lemmatechnologies.com/lemma/servad?pid={{PublisherID}}&aid={{AdUnit}}
endpoint: https://pbid.lemmamedia.com/lemma/servad?src=prebid&pid={{PublisherID}}&aid={{AdUnit}}
meta-info:
maintainer-email: [email protected]
endpoint-compression: gzip
Expand All @@ -13,3 +13,9 @@ adapters:
- video
supported-vendors:
vendor-id: 0
usersync:
cookie-family-name: lemmadigital
redirect:
url: https://sync.lemmadigital.com/setuid?publisher=850&redirect={{redirect_url}}
support-cors: false
uid-macro: '${UUID}'
2 changes: 1 addition & 1 deletion src/main/resources/bidder-config/playdigo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ adapters:
- video
- native
supported-vendors:
vendor-id: 0
vendor-id: 1302
usersync:
cookie-family-name: playdigo
redirect:
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/bidder-config/qt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ adapters:
- video
- native
supported-vendors:
vendor-id: 0
vendor-id: 1331
usersync:
cookie-family-name: qt
redirect:
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/bidder-config/smartx.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
adapters:
smartx:
endpoint: https://bid.smartclip.net/bid/1005
ortb-version: "2.6"
meta-info:
maintainer-email: [email protected]
app-media-types:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public void makeHttpRequestsShouldReturnErrorIfImpExtHasNoSiteId() {
impBuilder -> impBuilder
.id("123")
.ext(mapper.valueToTree(ExtPrebid.of(null,
ExtImpConnectAd.of(12, null, BigDecimal.ONE)))));
ExtImpConnectAd.of("12", null, BigDecimal.ONE)))));
// when
final Result<List<HttpRequest<BidRequest>>> result = target.makeHttpRequests(bidRequest);

Expand All @@ -164,7 +164,7 @@ public void impSecureShouldBeOneIfSitePageStartsFromHttps() {
impBuilder -> impBuilder
.id("123")
.ext(mapper.valueToTree(ExtPrebid.of(null,
ExtImpConnectAd.of(12, 1, BigDecimal.ONE)))));
ExtImpConnectAd.of("12", "1", BigDecimal.ONE)))));
// when
final Result<List<HttpRequest<BidRequest>>> result = target.makeHttpRequests(bidRequest);

Expand Down Expand Up @@ -202,7 +202,7 @@ private static Imp givenImp(Function<Imp.ImpBuilder, Imp.ImpBuilder> impCustomiz
.w(14)
.h(15).build())
.ext(mapper.valueToTree(ExtPrebid.of(null,
ExtImpConnectAd.of(12, 12, BigDecimal.ONE)))))
ExtImpConnectAd.of("12", "12", BigDecimal.ONE)))))
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"tagid": "2eb6bd58-865c-47ce-af7f-a918108c3fd2",
"ext": {
"connectad": {
"networkId": 12,
"siteId": 15,
"networkId": "12",
"siteId": "15",
"bidfloor": 14.7
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"ext": {
"tid": "${json-unit.any-string}",
"bidder": {
"networkId": 12,
"siteId": 15,
"networkId": "12",
"siteId": "15",
"bidfloor": 14.7
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@
"cur": [
"USD"
],
"regs": {
"ext": {
"gdpr": 0
}
"regs" : {
"gdpr" : 0
},
"ext": {
"prebid": {
Expand Down

0 comments on commit e246b13

Please sign in to comment.