diff --git a/adapters/rtbhouse/rtbhouse.go b/adapters/rtbhouse/rtbhouse.go index 92e0e57b287..089634cbd86 100644 --- a/adapters/rtbhouse/rtbhouse.go +++ b/adapters/rtbhouse/rtbhouse.go @@ -2,12 +2,10 @@ package rtbhouse import ( "encoding/json" - "errors" "fmt" "net/http" "strings" - "github.com/buger/jsonparser" "github.com/prebid/openrtb/v19/openrtb2" "github.com/prebid/prebid-server/v2/adapters" "github.com/prebid/prebid-server/v2/config" @@ -51,12 +49,9 @@ func (adapter *RTBHouseAdapter) MakeRequests( if err != nil { return nil, []error{err} } - if rtbhouseExt.BidFloor > 0 { + if rtbhouseExt.BidFloor > 0 && len(reqCopy.Cur) > 0 { + bidFloorCur = reqCopy.Cur[0] bidFloor = rtbhouseExt.BidFloor - bidFloorCur = BidderCurrency - if len(reqCopy.Cur) > 0 { - bidFloorCur = reqCopy.Cur[0] - } } } @@ -161,63 +156,13 @@ func (adapter *RTBHouseAdapter) MakeBids( for _, seatBid := range openRTBBidderResponse.SeatBid { for _, bid := range seatBid.Bid { bid := bid // pin! -> https://github.com/kyoh86/scopelint#whats-this - bidType, err := getMediaTypeForBid(bid) - if err != nil { - errs = append(errs, err) - continue - } else { - typedBid = &adapters.TypedBid{ - Bid: &bid, - BidType: bidType, - } - - // for native bid responses fix Adm field - if typedBid.BidType == openrtb_ext.BidTypeNative { - bid.AdM, err = getNativeAdm(bid.AdM) - if err != nil { - errs = append(errs, err) - continue - } - } - - bidderResponse.Bids = append(bidderResponse.Bids, typedBid) - } + typedBid = &adapters.TypedBid{Bid: &bid, BidType: "banner"} + bidderResponse.Bids = append(bidderResponse.Bids, typedBid) } } bidderResponse.Currency = BidderCurrency - return bidderResponse, errs - -} - -func getMediaTypeForBid(bid openrtb2.Bid) (openrtb_ext.BidType, error) { - switch bid.MType { - case openrtb2.MarkupBanner: - return openrtb_ext.BidTypeBanner, nil - case openrtb2.MarkupNative: - return openrtb_ext.BidTypeNative, nil - default: - return "", fmt.Errorf("unrecognized bid type in response from rtbhouse for bid %s", bid.ImpID) - } -} - -func getNativeAdm(adm string) (string, error) { - nativeAdm := make(map[string]interface{}) - err := json.Unmarshal([]byte(adm), &nativeAdm) - if err != nil { - return adm, errors.New("unable to unmarshal native adm") - } - - // move bid.adm.native to bid.adm - if _, ok := nativeAdm["native"]; ok { - //using jsonparser to avoid marshaling, encode escape, etc. - value, dataType, _, err := jsonparser.Get([]byte(adm), string(openrtb_ext.BidTypeNative)) - if err != nil || dataType != jsonparser.Object { - return adm, errors.New("unable to get native adm") - } - adm = string(value) - } + return bidderResponse, nil - return adm, nil } diff --git a/adapters/rtbhouse/rtbhousetest/exemplary/bidfloor-as-bidder-param-without-cur.json b/adapters/rtbhouse/rtbhousetest/exemplary/bidfloor-as-bidder-param-without-cur.json deleted file mode 100644 index 79aa038c3ca..00000000000 --- a/adapters/rtbhouse/rtbhousetest/exemplary/bidfloor-as-bidder-param-without-cur.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "publisherId": "12345", - "bidfloor": 3.00 - } - } - } - ], - "ext": { - "prebid": { - "currency": { - "rates": { - "EUR": { - "USD": 0.05 - } - }, - "usepbsrates": false - } - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://localhost/prebid_server", - "body": { - "id": "test-request-id", - "cur": [ - "USD" - ], - "imp": [ - { - "banner": { - "format": [ - { - "h": 250, - "w": 300 - } - ] - }, - "bidfloor": 3.00, - "bidfloorcur": "USD", - "ext": { - "bidder": { - "publisherId": "12345", - "bidfloor": 3.00 - } - }, - "id": "test-imp-id" - } - ], - "ext": { - "prebid": { - "currency": { - "rates": { - "EUR": { - "USD": 0.05 - } - }, - "usepbsrates": false - } - } - } - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-response-id", - "cur": "USD", - "seatbid": [ - { - "seat": "rtbhouse", - "bid": [ - { - "id": "randomid", - "impid": "test-imp-id", - "price": 300, - "adid": "12345678", - "adm": "some-test-ad", - "cid": "987", - "crid": "12345678", - "h": 250, - "w": 300, - "mtype": 1 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "randomid", - "impid": "test-imp-id", - "price": 300, - "adid": "12345678", - "adm": "some-test-ad", - "cid": "987", - "crid": "12345678", - "h": 250, - "w": 300, - "mtype": 1 - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/rtbhouse/rtbhousetest/exemplary/bidfloor-as-bidder-param.json b/adapters/rtbhouse/rtbhousetest/exemplary/bidfloor-as-bidder-param.json deleted file mode 100644 index 99b3a87ebfa..00000000000 --- a/adapters/rtbhouse/rtbhousetest/exemplary/bidfloor-as-bidder-param.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "cur": [ - "EUR" - ], - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "publisherId": "12345", - "bidfloor": 2 - } - } - } - ], - "ext": { - "prebid": { - "currency": { - "rates": { - "EUR": { - "USD": 0.05 - } - }, - "usepbsrates": false - } - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://localhost/prebid_server", - "body": { - "id": "test-request-id", - "cur": [ - "USD" - ], - "imp": [ - { - "banner": { - "format": [ - { - "h": 250, - "w": 300 - } - ] - }, - "bidfloor": 0.1, - "bidfloorcur": "USD", - "ext": { - "bidder": { - "publisherId": "12345", - "bidfloor": 2 - } - }, - "id": "test-imp-id" - } - ], - "ext": { - "prebid": { - "currency": { - "rates": { - "EUR": { - "USD": 0.05 - } - }, - "usepbsrates": false - } - } - } - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-response-id", - "cur": "USD", - "seatbid": [ - { - "seat": "rtbhouse", - "bid": [ - { - "id": "randomid", - "impid": "test-imp-id", - "price": 300, - "adid": "12345678", - "adm": "some-test-ad", - "cid": "987", - "crid": "12345678", - "h": 250, - "w": 300, - "mtype": 1 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "randomid", - "impid": "test-imp-id", - "price": 300, - "adid": "12345678", - "adm": "some-test-ad", - "cid": "987", - "crid": "12345678", - "h": 250, - "w": 300, - "mtype": 1 - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/rtbhouse/rtbhousetest/exemplary/bidfloor-as-impbidfloor-with-cur.json b/adapters/rtbhouse/rtbhousetest/exemplary/bidfloor-as-impbidfloor-with-cur.json deleted file mode 100644 index 85e8a1c28cf..00000000000 --- a/adapters/rtbhouse/rtbhousetest/exemplary/bidfloor-as-impbidfloor-with-cur.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "bidfloor": 1.00, - "bidfloorcur": "EUR", - "ext": { - "bidder": { - "publisherId": "12345" - } - } - } - ], - "ext": { - "prebid": { - "currency": { - "rates": { - "EUR": { - "USD": 0.05 - } - }, - "usepbsrates": false - } - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://localhost/prebid_server", - "body": { - "id": "test-request-id", - "cur": [ - "USD" - ], - "imp": [ - { - "banner": { - "format": [ - { - "h": 250, - "w": 300 - } - ] - }, - "bidfloor": 0.05, - "bidfloorcur": "USD", - "ext": { - "bidder": { - "publisherId": "12345" - } - }, - "id": "test-imp-id" - } - ], - "ext": { - "prebid": { - "currency": { - "rates": { - "EUR": { - "USD": 0.05 - } - }, - "usepbsrates": false - } - } - } - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-response-id", - "cur": "USD", - "seatbid": [ - { - "seat": "rtbhouse", - "bid": [ - { - "id": "randomid", - "impid": "test-imp-id", - "price": 300, - "adid": "12345678", - "adm": "some-test-ad", - "cid": "987", - "crid": "12345678", - "h": 250, - "w": 300, - "mtype": 1 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "randomid", - "impid": "test-imp-id", - "price": 300, - "adid": "12345678", - "adm": "some-test-ad", - "cid": "987", - "crid": "12345678", - "h": 250, - "w": 300, - "mtype": 1 - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/rtbhouse/rtbhousetest/exemplary/bidfloor-as-impbidfloor-without-cur.json b/adapters/rtbhouse/rtbhousetest/exemplary/bidfloor-as-impbidfloor-without-cur.json deleted file mode 100644 index 1417965741e..00000000000 --- a/adapters/rtbhouse/rtbhousetest/exemplary/bidfloor-as-impbidfloor-without-cur.json +++ /dev/null @@ -1,128 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "bidfloor": 1.00, - "ext": { - "bidder": { - "publisherId": "12345" - } - } - } - ], - "ext": { - "prebid": { - "currency": { - "rates": { - "EUR": { - "USD": 0.05 - } - }, - "usepbsrates": false - } - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://localhost/prebid_server", - "body": { - "id": "test-request-id", - "cur": [ - "USD" - ], - "imp": [ - { - "banner": { - "format": [ - { - "h": 250, - "w": 300 - } - ] - }, - "bidfloor": 1, - "ext": { - "bidder": { - "publisherId": "12345" - } - }, - "id": "test-imp-id" - } - ], - "ext": { - "prebid": { - "currency": { - "rates": { - "EUR": { - "USD": 0.05 - } - }, - "usepbsrates": false - } - } - } - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-response-id", - "cur": "USD", - "seatbid": [ - { - "seat": "rtbhouse", - "bid": [ - { - "id": "randomid", - "impid": "test-imp-id", - "price": 300, - "adid": "12345678", - "adm": "some-test-ad", - "cid": "987", - "crid": "12345678", - "h": 250, - "w": 300, - "mtype": 1 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "randomid", - "impid": "test-imp-id", - "price": 300, - "adid": "12345678", - "adm": "some-test-ad", - "cid": "987", - "crid": "12345678", - "h": 250, - "w": 300, - "mtype": 1 - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/rtbhouse/rtbhousetest/exemplary/currency-conversion.json b/adapters/rtbhouse/rtbhousetest/exemplary/currency-conversion.json new file mode 100644 index 00000000000..95bfb1e4420 --- /dev/null +++ b/adapters/rtbhouse/rtbhousetest/exemplary/currency-conversion.json @@ -0,0 +1,123 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + } + ] + }, + "bidfloor": 1.00, + "bidfloorcur": "EUR", + "ext": { + "bidder": { + "placementId": "12345" + } + } + } + ], + "ext": { + "prebid": { + "currency": { + "rates": { + "EUR": { + "USD": 0.05 + } + }, + "usepbsrates": false + } + } + } + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://localhost/prebid_server", + "body": { + "id": "test-request-id", + "cur": ["USD"], + "imp": [ + { + "banner": { + "format": [ + { + "h": 250, + "w": 300 + } + ] + }, + "bidfloor": 0.05, + "bidfloorcur": "USD", + "ext": { + "bidder": { + "placementId": "12345" + } + }, + "id": "test-imp-id" + } + ], + "ext": { + "prebid": { + "currency": { + "rates": { + "EUR": { + "USD": 0.05 + } + }, + "usepbsrates": false + } + } + } + } + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-response-id", + "cur": "USD", + "seatbid": [{ + "seat": "rtbhouse", + "bid": [{ + "id": "randomid", + "impid": "test-imp-id", + "price": 300, + "adid": "12345678", + "adm": "some-test-ad", + "cid": "987", + "crid": "12345678", + "h": 250, + "w": 300 + } + ] + }] + } + } + } + ], + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "randomid", + "impid": "test-imp-id", + "price": 300, + "adid": "12345678", + "adm": "some-test-ad", + "cid": "987", + "crid": "12345678", + "h": 250, + "w": 300 + }, + "type": "banner" + } + ] + } + ] + } diff --git a/adapters/rtbhouse/rtbhousetest/exemplary/native-with-deprecated-native-prop.json b/adapters/rtbhouse/rtbhousetest/exemplary/native-with-deprecated-native-prop.json deleted file mode 100644 index e79b21a1207..00000000000 --- a/adapters/rtbhouse/rtbhousetest/exemplary/native-with-deprecated-native-prop.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "mockBidRequest": { - "imp": [ - { - "ext": { - "bidder": {} - }, - "id": "test-native-imp", - "native": { - "request": "{\"eventtrackers\":[{\"event\":1,\"methods\":[1,2]}],\"ver\":\"1.2\",\"assets\":[{\"id\":0,\"required\":1,\"title\":{\"len\":140}},{\"id\":1,\"required\":1,\"data\":{\"type\":2}},{\"id\":2,\"required\":1,\"img\":{\"type\":3}}]}", - "ver": "1.2" - } - } - ], - "site": { - "page": "https://good.site/url" - }, - "id": "test-native-request", - "ext": {}, - "debug": 1 - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://localhost/prebid_server", - "body": { - "id": "test-native-request", - "cur": [ - "USD" - ], - "imp": [ - { - "id": "test-native-imp", - "native": { - "request": "{\"eventtrackers\":[{\"event\":1,\"methods\":[1,2]}],\"ver\":\"1.2\",\"assets\":[{\"id\":0,\"required\":1,\"title\":{\"len\":140}},{\"id\":1,\"required\":1,\"data\":{\"type\":2}},{\"id\":2,\"required\":1,\"img\":{\"type\":3}}]}", - "ver": "1.2" - }, - "ext": { - "bidder": {} - } - } - ], - "site": { - "page": "https://good.site/url" - }, - "ext": {} - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-native-request", - "bidid": "test-bidid", - "cur": "USD", - "seatbid": [ - { - "seat": "rtbhouse", - "bid": [ - { - "id": "test-native-request", - "impid": "test-native-imp", - "price": 0.5, - "adid": "test-adid", - "adm": "{\"native\":{\"ver\":\"1.2\",\"assets\":[{\"id\":0,\"title\":{\"text\":\"title text\"}},{\"id\":1,\"data\":{\"value\":\"data value\"}},{\"id\":2,\"img\":{\"url\":\"image.url\",\"w\":1200,\"h\":628}}],\"link\":{\"url\":\"link.url\"},\"imptrackers\":[\"imp.tracker.url\"],\"eventtrackers\":[{\"event\":1,\"method\":1,\"url\":\"event.tracker.url\"}]}}", - "adomain": [ "adomain.com" ], - "cid": "test-cid", - "crid": "test-crid", - "dealid": "test-dealid", - "mtype": 4 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "test-native-request", - "impid": "test-native-imp", - "price": 0.5, - "adid": "test-adid", - "adm": "{\"ver\":\"1.2\",\"assets\":[{\"id\":0,\"title\":{\"text\":\"title text\"}},{\"id\":1,\"data\":{\"value\":\"data value\"}},{\"id\":2,\"img\":{\"url\":\"image.url\",\"w\":1200,\"h\":628}}],\"link\":{\"url\":\"link.url\"},\"imptrackers\":[\"imp.tracker.url\"],\"eventtrackers\":[{\"event\":1,\"method\":1,\"url\":\"event.tracker.url\"}]}", - "adomain": [ "adomain.com" ], - "cid": "test-cid", - "crid": "test-crid", - "dealid": "test-dealid", - "mtype": 4 - }, - "type": "native" - } - ] - } - ] -} diff --git a/adapters/rtbhouse/rtbhousetest/exemplary/native-with-proper-native-response.json b/adapters/rtbhouse/rtbhousetest/exemplary/native-with-proper-native-response.json deleted file mode 100644 index 9f5962fd3a1..00000000000 --- a/adapters/rtbhouse/rtbhousetest/exemplary/native-with-proper-native-response.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "mockBidRequest": { - "imp": [ - { - "ext": { - "bidder": {} - }, - "id": "test-native-imp", - "native": { - "request": "{\"eventtrackers\":[{\"event\":1,\"methods\":[1,2]}],\"ver\":\"1.2\",\"assets\":[{\"id\":0,\"required\":1,\"title\":{\"len\":140}},{\"id\":1,\"required\":1,\"data\":{\"type\":2}},{\"id\":2,\"required\":1,\"img\":{\"type\":3}}]}", - "ver": "1.2" - } - } - ], - "site": { - "page": "https://good.site/url" - }, - "id": "test-native-request", - "ext": {}, - "debug": 1 - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://localhost/prebid_server", - "body": { - "id": "test-native-request", - "cur": [ - "USD" - ], - "imp": [ - { - "id": "test-native-imp", - "native": { - "request": "{\"eventtrackers\":[{\"event\":1,\"methods\":[1,2]}],\"ver\":\"1.2\",\"assets\":[{\"id\":0,\"required\":1,\"title\":{\"len\":140}},{\"id\":1,\"required\":1,\"data\":{\"type\":2}},{\"id\":2,\"required\":1,\"img\":{\"type\":3}}]}", - "ver": "1.2" - }, - "ext": { - "bidder": {} - } - } - ], - "site": { - "page": "https://good.site/url" - }, - "ext": {} - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-native-request", - "bidid": "test-bidid", - "cur": "USD", - "seatbid": [ - { - "seat": "rtbhouse", - "bid": [ - { - "id": "test-native-request", - "impid": "test-native-imp", - "price": 0.5, - "adid": "test-adid", - "adm": "{\"ver\":\"1.2\",\"assets\":[{\"id\":0,\"title\":{\"text\":\"title text\"}},{\"id\":1,\"data\":{\"value\":\"data value\"}},{\"id\":2,\"img\":{\"url\":\"image.url\",\"w\":1200,\"h\":628}}],\"link\":{\"url\":\"link.url\"},\"imptrackers\":[\"imp.tracker.url\"],\"eventtrackers\":[{\"event\":1,\"method\":1,\"url\":\"event.tracker.url\"}]}", - "adomain": [ "adomain.com" ], - "cid": "test-cid", - "crid": "test-crid", - "dealid": "test-dealid", - "mtype": 4 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "test-native-request", - "impid": "test-native-imp", - "price": 0.5, - "adid": "test-adid", - "adm": "{\"ver\":\"1.2\",\"assets\":[{\"id\":0,\"title\":{\"text\":\"title text\"}},{\"id\":1,\"data\":{\"value\":\"data value\"}},{\"id\":2,\"img\":{\"url\":\"image.url\",\"w\":1200,\"h\":628}}],\"link\":{\"url\":\"link.url\"},\"imptrackers\":[\"imp.tracker.url\"],\"eventtrackers\":[{\"event\":1,\"method\":1,\"url\":\"event.tracker.url\"}]}", - "adomain": [ "adomain.com" ], - "cid": "test-cid", - "crid": "test-crid", - "dealid": "test-dealid", - "mtype": 4 - }, - "type": "native" - } - ] - } - ] -} diff --git a/adapters/rtbhouse/rtbhousetest/exemplary/simple-banner.json b/adapters/rtbhouse/rtbhousetest/exemplary/simple-banner.json index 468e73f2aca..2a8c4681ffa 100644 --- a/adapters/rtbhouse/rtbhousetest/exemplary/simple-banner.json +++ b/adapters/rtbhouse/rtbhousetest/exemplary/simple-banner.json @@ -56,8 +56,7 @@ "cid": "987", "crid": "12345678", "h": 250, - "w": 300, - "mtype": 1 + "w": 300 }] }], "cur": "USD" @@ -77,8 +76,7 @@ "cid": "987", "crid": "12345678", "w": 300, - "h": 250, - "mtype": 1 + "h": 250 }, "type": "banner" }] diff --git a/adapters/rtbhouse/rtbhousetest/exemplary/two-bidfloors-given-param-and-impbidfloor.json b/adapters/rtbhouse/rtbhousetest/exemplary/two-bidfloors-given-param-and-impbidfloor.json deleted file mode 100644 index fc706d97004..00000000000 --- a/adapters/rtbhouse/rtbhousetest/exemplary/two-bidfloors-given-param-and-impbidfloor.json +++ /dev/null @@ -1,132 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "bidfloor": 1.00, - "bidfloorcur": "EUR", - "ext": { - "bidder": { - "publisherId": "12345", - "bidfloor": 2.00 - } - } - } - ], - "ext": { - "prebid": { - "currency": { - "rates": { - "EUR": { - "USD": 0.05 - } - }, - "usepbsrates": false - } - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://localhost/prebid_server", - "body": { - "id": "test-request-id", - "cur": [ - "USD" - ], - "imp": [ - { - "banner": { - "format": [ - { - "h": 250, - "w": 300 - } - ] - }, - "bidfloor": 0.05, - "bidfloorcur": "USD", - "ext": { - "bidder": { - "publisherId": "12345", - "bidfloor": 2 - } - }, - "id": "test-imp-id" - } - ], - "ext": { - "prebid": { - "currency": { - "rates": { - "EUR": { - "USD": 0.05 - } - }, - "usepbsrates": false - } - } - } - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-response-id", - "cur": "USD", - "seatbid": [ - { - "seat": "rtbhouse", - "bid": [ - { - "id": "randomid", - "impid": "test-imp-id", - "price": 300, - "adid": "12345678", - "adm": "some-test-ad", - "cid": "987", - "crid": "12345678", - "h": 250, - "w": 300, - "mtype": 1 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "randomid", - "impid": "test-imp-id", - "price": 300, - "adid": "12345678", - "adm": "some-test-ad", - "cid": "987", - "crid": "12345678", - "h": 250, - "w": 300, - "mtype": 1 - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/rtbhouse/rtbhousetest/supplemental/banner-native-req-faulty-mtype-in-native.json b/adapters/rtbhouse/rtbhousetest/supplemental/banner-native-req-faulty-mtype-in-native.json deleted file mode 100644 index 6e6f415acbc..00000000000 --- a/adapters/rtbhouse/rtbhousetest/supplemental/banner-native-req-faulty-mtype-in-native.json +++ /dev/null @@ -1,141 +0,0 @@ -{ - "mockBidRequest": { - "imp": [ - { - "ext": { - "bidder": {} - }, - "id": "test-native-imp", - "native": { - "request": "{\"eventtrackers\":[{\"event\":1,\"methods\":[1,2]}],\"ver\":\"1.2\",\"assets\":[{\"id\":0,\"required\":1,\"title\":{\"len\":140}},{\"id\":1,\"required\":1,\"data\":{\"type\":2}},{\"id\":2,\"required\":1,\"img\":{\"type\":3}}]}", - "ver": "1.2" - } - }, - { - "id": "test-banner-imp", - "banner": { - "format": [{ - "w": 300, - "h": 250 - }] - }, - "ext": { - "bidder": {} - } - } - ], - "site": { - "page": "https://good.site/url" - }, - "id": "test-multi-slot-request", - "ext": {}, - "debug": 1 - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://localhost/prebid_server", - "body": { - "id": "test-multi-slot-request", - "cur": [ - "USD" - ], - "imp": [ - { - "id": "test-native-imp", - "native": { - "request": "{\"eventtrackers\":[{\"event\":1,\"methods\":[1,2]}],\"ver\":\"1.2\",\"assets\":[{\"id\":0,\"required\":1,\"title\":{\"len\":140}},{\"id\":1,\"required\":1,\"data\":{\"type\":2}},{\"id\":2,\"required\":1,\"img\":{\"type\":3}}]}", - "ver": "1.2" - }, - "ext": { - "bidder": {} - } - }, - { - "id": "test-banner-imp", - "banner": { - "format": [{ - "w": 300, - "h": 250 - }] - }, - "ext": { - "bidder": {} - } - } - ], - "site": { - "page": "https://good.site/url" - }, - "ext": {} - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-multi-slot-request", - "bidid": "test-bidid", - "cur": "USD", - "seatbid": [ - { - "seat": "rtbhouse", - "bid": [ - { - "id": "randomid-native", - "impid": "test-native-imp", - "price": 0.5, - "adid": "test-adid", - "adm": "{\"native\":{\"ver\":\"1.2\",\"assets\":[{\"id\":0,\"title\":{\"text\":\"title text\"}},{\"id\":1,\"data\":{\"value\":\"data value\"}},{\"id\":2,\"img\":{\"url\":\"image.url\",\"w\":1200,\"h\":628}}],\"link\":{\"url\":\"link.url\"},\"imptrackers\":[\"imp.tracker.url\"],\"eventtrackers\":[{\"event\":1,\"method\":1,\"url\":\"event.tracker.url\"}]}}", - "adomain": [ "adomain.com" ], - "cid": "test-cid", - "crid": "test-crid", - "dealid": "test-dealid", - "mtype": 99 - }, - { - "id": "randomid-banner", - "impid": "test-banner-imp", - "price": 0.500000, - "adid": "12345678", - "adm": "some-test-ad", - "cid": "987", - "crid": "12345678", - "h": 250, - "w": 300, - "mtype": 1 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [{ - "bid": { - "id": "randomid-banner", - "impid": "test-banner-imp", - "price": 0.500000, - "adid": "12345678", - "adm": "some-test-ad", - "cid": "987", - "crid": "12345678", - "h": 250, - "w": 300, - "mtype": 1 - }, - "type": "banner" - } - ] - } - ], - "expectedMakeBidsErrors": [ - { - "value": "unrecognized bid type in response from rtbhouse for bid test-native-imp", - "comparison": "literal" - } - ] -} diff --git a/adapters/rtbhouse/rtbhousetest/supplemental/faulty-request-bidder-params.json b/adapters/rtbhouse/rtbhousetest/supplemental/faulty-request-bidder-params.json deleted file mode 100644 index 70fddf620e6..00000000000 --- a/adapters/rtbhouse/rtbhousetest/supplemental/faulty-request-bidder-params.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "banner-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "publisherId": 12345 - } - } - } - ], - "ext": {} - }, - "expectedMakeRequestsErrors": [ - { - "value": "Error while unmarshaling bidder extension", - "comparison": "literal" - } - ] -} diff --git a/adapters/rtbhouse/rtbhousetest/supplemental/faulty-request-no-impext.json b/adapters/rtbhouse/rtbhousetest/supplemental/faulty-request-no-impext.json deleted file mode 100644 index f416f8106fa..00000000000 --- a/adapters/rtbhouse/rtbhousetest/supplemental/faulty-request-no-impext.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "banner-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - } - } - ], - "ext": {} - }, - "expectedMakeRequestsErrors": [ - { - "value": "Bidder extension not provided or can't be unmarshalled", - "comparison": "literal" - } - ] -} diff --git a/adapters/rtbhouse/rtbhousetest/supplemental/native-with-faulty-adm-native-prop.json b/adapters/rtbhouse/rtbhousetest/supplemental/native-with-faulty-adm-native-prop.json deleted file mode 100644 index 5e1aa0ef4b7..00000000000 --- a/adapters/rtbhouse/rtbhousetest/supplemental/native-with-faulty-adm-native-prop.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "mockBidRequest": { - "imp": [ - { - "ext": { - "bidder": {} - }, - "id": "test-native-imp", - "native": { - "request": "{\"eventtrackers\":[{\"event\":1,\"methods\":[1,2]}],\"ver\":\"1.2\",\"assets\":[{\"id\":0,\"required\":1,\"title\":{\"len\":140}},{\"id\":1,\"required\":1,\"data\":{\"type\":2}},{\"id\":2,\"required\":1,\"img\":{\"type\":3}}]}", - "ver": "1.2" - } - } - ], - "site": { - "page": "https://good.site/url" - }, - "id": "test-native-request", - "ext": {}, - "debug": 1 - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://localhost/prebid_server", - "body": { - "id": "test-native-request", - "cur": [ - "USD" - ], - "imp": [ - { - "id": "test-native-imp", - "native": { - "request": "{\"eventtrackers\":[{\"event\":1,\"methods\":[1,2]}],\"ver\":\"1.2\",\"assets\":[{\"id\":0,\"required\":1,\"title\":{\"len\":140}},{\"id\":1,\"required\":1,\"data\":{\"type\":2}},{\"id\":2,\"required\":1,\"img\":{\"type\":3}}]}", - "ver": "1.2" - }, - "ext": { - "bidder": {} - } - } - ], - "site": { - "page": "https://good.site/url" - }, - "ext": {} - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-native-request", - "bidid": "test-bidid", - "cur": "USD", - "seatbid": [ - { - "seat": "rtbhouse", - "bid": [ - { - "id": "test-native-request", - "impid": "test-native-imp", - "price": 0.5, - "adid": "test-adid", - "adm": "{\"native\":\"faulty object\"}", - "adomain": [ "adomain.com" ], - "cid": "test-cid", - "crid": "test-crid", - "dealid": "test-dealid", - "mtype": 4 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [] - } - ], - "expectedMakeBidsErrors": [ - { - "value": "unable to get native adm", - "comparison": "literal" - } - ] -} diff --git a/adapters/rtbhouse/rtbhousetest/supplemental/native-with-faulty-adm-response.json b/adapters/rtbhouse/rtbhousetest/supplemental/native-with-faulty-adm-response.json deleted file mode 100644 index 41cc909f304..00000000000 --- a/adapters/rtbhouse/rtbhousetest/supplemental/native-with-faulty-adm-response.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "mockBidRequest": { - "imp": [ - { - "ext": { - "bidder": {} - }, - "id": "test-native-imp", - "native": { - "request": "{\"eventtrackers\":[{\"event\":1,\"methods\":[1,2]}],\"ver\":\"1.2\",\"assets\":[{\"id\":0,\"required\":1,\"title\":{\"len\":140}},{\"id\":1,\"required\":1,\"data\":{\"type\":2}},{\"id\":2,\"required\":1,\"img\":{\"type\":3}}]}", - "ver": "1.2" - } - } - ], - "site": { - "page": "https://good.site/url" - }, - "id": "test-native-request", - "ext": {}, - "debug": 1 - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://localhost/prebid_server", - "body": { - "id": "test-native-request", - "cur": [ - "USD" - ], - "imp": [ - { - "id": "test-native-imp", - "native": { - "request": "{\"eventtrackers\":[{\"event\":1,\"methods\":[1,2]}],\"ver\":\"1.2\",\"assets\":[{\"id\":0,\"required\":1,\"title\":{\"len\":140}},{\"id\":1,\"required\":1,\"data\":{\"type\":2}},{\"id\":2,\"required\":1,\"img\":{\"type\":3}}]}", - "ver": "1.2" - }, - "ext": { - "bidder": {} - } - } - ], - "site": { - "page": "https://good.site/url" - }, - "ext": {} - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-native-request", - "bidid": "test-bidid", - "cur": "USD", - "seatbid": [ - { - "seat": "rtbhouse", - "bid": [ - { - "id": "test-native-request", - "impid": "test-native-imp", - "price": 0.5, - "adid": "test-adid", - "adm": "{\"ver\":\"1.2\"", - "adomain": [ "adomain.com" ], - "cid": "test-cid", - "crid": "test-crid", - "dealid": "test-dealid", - "mtype": 4 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [] - } - ], - "expectedMakeBidsErrors": [ - { - "value": "unable to unmarshal native adm", - "comparison": "literal" - } - ] -} diff --git a/adapters/rtbhouse/rtbhousetest/supplemental/simple-banner-bad-mtype.json b/adapters/rtbhouse/rtbhousetest/supplemental/simple-banner-bad-mtype.json deleted file mode 100644 index fc52cc30601..00000000000 --- a/adapters/rtbhouse/rtbhousetest/supplemental/simple-banner-bad-mtype.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "page": "https://good.site/url" - }, - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": {} - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://localhost/prebid_server", - "body": { - "id": "test-request-id", - "cur": [ - "USD" - ], - "site": { - "page": "https://good.site/url" - }, - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": {} - } - } - ] - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "seat": "rtbhouse", - "bid": [ - { - "id": "randomid", - "impid": "test-imp-id", - "price": 0.500000, - "adid": "12345678", - "adm": "some-test-ad", - "cid": "987", - "crid": "12345678", - "h": 250, - "w": 300, - "mtype": 99 - } - ] - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [] - } - ], - "expectedMakeBidsErrors": [ - { - "value": "unrecognized bid type in response from rtbhouse for bid test-imp-id", - "comparison": "literal" - } - ] -} diff --git a/adapters/rtbhouse/rtbhousetest/supplemental/simple-banner-no-mtype.json b/adapters/rtbhouse/rtbhousetest/supplemental/simple-banner-no-mtype.json deleted file mode 100644 index 8bb9e8a1f89..00000000000 --- a/adapters/rtbhouse/rtbhousetest/supplemental/simple-banner-no-mtype.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "page": "https://good.site/url" - }, - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": {} - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://localhost/prebid_server", - "body": { - "id": "test-request-id", - "cur": [ - "USD" - ], - "site": { - "page": "https://good.site/url" - }, - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": {} - } - } - ] - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "seat": "rtbhouse", - "bid": [ - { - "id": "randomid", - "impid": "test-imp-id", - "price": 0.500000, - "adid": "12345678", - "adm": "some-test-ad", - "cid": "987", - "crid": "12345678", - "h": 250, - "w": 300 - } - ] - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [] - } - ], - "expectedMakeBidsErrors": [ - { - "value": "unrecognized bid type in response from rtbhouse for bid test-imp-id", - "comparison": "literal" - } - ] -} diff --git a/static/bidder-info/rtbhouse.yaml b/static/bidder-info/rtbhouse.yaml index b80cc0ff4f8..ad2fbfcbc95 100644 --- a/static/bidder-info/rtbhouse.yaml +++ b/static/bidder-info/rtbhouse.yaml @@ -7,7 +7,6 @@ capabilities: site: mediaTypes: - banner - - native userSync: # rtbhouse supports user syncing, but requires configuration by the host. contact this # bidder directly at the email address in this file to ask about enabling user sync.