diff --git a/adapters/zentotem/params_test.go b/adapters/zentotem/params_test.go new file mode 100644 index 00000000000..006587d453e --- /dev/null +++ b/adapters/zentotem/params_test.go @@ -0,0 +1,45 @@ +package zentotem + +import ( + "encoding/json" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "testing" +) + +//Zentotem doesn't currently require any custom fields. This file is included for conformity only +//We do include an unused, non-required custom param in static/bidder-params/zentotem.json, but only to hinder the prebid server from crashing by looking for at least 1 custom param + +// This file actually intends to test static/bidder-params/zentotem.json +// +// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.zentotem +// TestValidParams makes sure that the Zentotem schema accepts all imp.ext fields which we intend to support. +func TestValidParams(t *testing.T) { + validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") + if err != nil { + t.Fatalf("Failed to fetch the json-schemas. %v", err) + } + + for _, validParam := range validParams { + if err := validator.Validate(openrtb_ext.BidderZentotem, json.RawMessage(validParam)); err != nil { + t.Errorf("Schema rejected Zentotem params: %s", validParam) + } + } +} + +// TestInvalidParams makes sure that the Zentotem schema rejects all the imp.ext fields we don't support. +func TestInvalidParams(t *testing.T) { + validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") + if err != nil { + t.Fatalf("Failed to fetch the json-schemas. %v", err) + } + + for _, invalidParam := range invalidParams { + if err := validator.Validate(openrtb_ext.BidderZentotem, json.RawMessage(invalidParam)); err == nil { + t.Errorf("Schema allowed unexpected params: %s", invalidParam) + } + } +} + +var validParams = []string{} + +var invalidParams = []string{} diff --git a/adapters/zentotem/zentotem.go b/adapters/zentotem/zentotem.go new file mode 100644 index 00000000000..3ecd78d4b7e --- /dev/null +++ b/adapters/zentotem/zentotem.go @@ -0,0 +1,93 @@ +package zentotem + +import ( + "encoding/json" + "fmt" + "github.com/prebid/openrtb/v20/openrtb2" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" +) + +type adapter struct { + endpoint string +} + +// Builder builds a new instance of the {bidder} adapter for the given bidder with the given config. +func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) { + bidder := &adapter{ + endpoint: config.Endpoint, + } + return bidder, nil +} + +func (a *adapter) MakeRequests(request *openrtb2.BidRequest, requestInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { + requests := make([]*adapters.RequestData, 0, len(request.Imp)) + var errors []error + + requestCopy := *request + for _, imp := range request.Imp { + requestCopy.Imp = []openrtb2.Imp{imp} + + requestJSON, err := json.Marshal(request) + if err != nil { + errors = append(errors, err) + continue + } + + requestData := &adapters.RequestData{ + Method: "POST", + Uri: a.endpoint, + Body: requestJSON, + ImpIDs: []string{imp.ID}, + } + requests = append(requests, requestData) + } + return requests, errors +} + +func getMediaTypeForBid(bid openrtb2.Bid) (openrtb_ext.BidType, error) { + switch bid.MType { + case openrtb2.MarkupBanner: + return openrtb_ext.BidTypeBanner, nil + case openrtb2.MarkupVideo: + return openrtb_ext.BidTypeVideo, nil + case openrtb2.MarkupNative: + return openrtb_ext.BidTypeNative, nil + } + + return "", fmt.Errorf("could not define media type for impression: %s", bid.ImpID) +} + +func (a *adapter) MakeBids(request *openrtb2.BidRequest, requestData *adapters.RequestData, responseData *adapters.ResponseData) (*adapters.BidderResponse, []error) { + if adapters.IsResponseStatusCodeNoContent(responseData) { + return nil, nil + } + + if err := adapters.CheckResponseStatusCodeForErrors(responseData); err != nil { + return nil, []error{err} + } + var response openrtb2.BidResponse + if err := json.Unmarshal(responseData.Body, &response); err != nil { + return nil, []error{err} + } + + bidResponse := adapters.NewBidderResponseWithBidsCapacity(len(request.Imp)) + bidResponse.Currency = response.Cur + var errors []error + for _, seatBid := range response.SeatBid { + for i := range seatBid.Bid { + bidType, err := getMediaTypeForBid(seatBid.Bid[i]) + if err != nil { + errors = append(errors, err) + continue + } + + bidResponse.Bids = append(bidResponse.Bids, &adapters.TypedBid{ + Bid: &seatBid.Bid[i], + BidType: bidType, + }) + } + } + return bidResponse, nil +} diff --git a/adapters/zentotem/zentotem_test.go b/adapters/zentotem/zentotem_test.go new file mode 100644 index 00000000000..b404c833a50 --- /dev/null +++ b/adapters/zentotem/zentotem_test.go @@ -0,0 +1,71 @@ +package zentotem + +import ( + "github.com/prebid/openrtb/v20/openrtb2" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/stretchr/testify/assert" + "testing" +) + +func TestJsonSamples(t *testing.T) { + bidder, buildErr := Builder(openrtb_ext.BidderZentotem, config.Adapter{ + Endpoint: "https://rtb.zentotem.net/bid?sspuid=cqlnvfk00bhs0b6rci6g"}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) + + if buildErr != nil { + t.Fatalf("Builder returned unexpected error %v", buildErr) + } + + adapterstest.RunJSONBidderTest(t, "zentotemtest", bidder) +} + +func TestGetMediaTypeForBid(t *testing.T) { + tests := []struct { + name string + bid openrtb2.Bid + wantType openrtb_ext.BidType + wantErr bool + }{ + { + name: "get bid native type", + bid: openrtb2.Bid{ + MType: 4, + }, + wantType: openrtb_ext.BidTypeNative, + wantErr: false, + }, + { + name: "get bid banner type", + bid: openrtb2.Bid{ + MType: 1, + }, + wantType: openrtb_ext.BidTypeBanner, + wantErr: false, + }, + { + name: "get bid video type", + bid: openrtb2.Bid{ + MType: 2, + }, + wantType: openrtb_ext.BidTypeVideo, + wantErr: false, + }, + { + name: "fail", + wantType: "", + wantErr: true, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + bType, err := getMediaTypeForBid(tt.bid) + if (err != nil) != tt.wantErr { + t.Errorf("getMediaTypeForBid error = %v, wantErr %v", err, tt.wantErr) + } + + assert.Equal(t, bType, tt.wantType) + }) + } +} diff --git a/adapters/zentotem/zentotemtest/exemplary/banner-200-212.json b/adapters/zentotem/zentotemtest/exemplary/banner-200-212.json new file mode 100644 index 00000000000..3083850c083 --- /dev/null +++ b/adapters/zentotem/zentotemtest/exemplary/banner-200-212.json @@ -0,0 +1,198 @@ +{ + "mockBidRequest": { + "id": "058e84c8-3684-4725-be57-6a211fb8abc3", + "at": 2, + "bcat": [ "IAB8-18", "IAB8-5", "IAB9-9" ], + "cur": [ + "RUB" + ], + "tmax": 250, + "imp": [ + { + "id": "test-imp-id", + "bidfloor": 10, + "bidfloorcur": "RUB", + "tagid": "65f0c2a2feb788d7", + "displaymanager": "Fyber", + "displaymanagerver": "10.1.1", + "banner": { + "api": [ + 4,5 + ], + "mimes": [ + "application/javascript", + "text/html", + "text/javascript", + "image/png", + "image/jpeg", + "image/gif" + ] + }, + "instl": 1 + } + ], + "app": { + "privacypolicy": 1, + "paid": 0, + "id": "1757830", + "name": "some-app-name", + "bundle": "some-app-bundle", + "storeurl": "some-store-url", + "cat": [ + + "IAB1-1" + ], + "publisher": { + "id": "gambling" + } + }, + "device": { + "dnt": 0, + "devicetype": 4, + "h": 980, + "w": 350, + "connectiontype": 2, + "ua": "Mozilla/5.0 (Linux; Android 10; YAL-L21 Build/HUAWEIYAL-L21; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.131 Mobile Safari/537.36", + "ip": "95.104.196.182", + "make": "Huawei", + "model": "YAL-L21", + "os": "Android", + "osv": "10.0", + "ifa": "6cecfc3c-de97-4861-ba6c-41a9dc94b391", + "geo": { + "country": "RUS" + } + }, + "user": { + "id": "6cecfc3c-de97-4861-ba6c-41a9dc94b391" + } + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://rtb.zentotem.net/bid?sspuid=cqlnvfk00bhs0b6rci6g", + "body": { + "id": "058e84c8-3684-4725-be57-6a211fb8abc3", + "at": 2, + "bcat": [ "IAB8-18", "IAB8-5", "IAB9-9" ], + "cur": [ + "RUB" + ], + "tmax": 250, + "imp": [ + { + "id": "test-imp-id", + "bidfloor": 10, + "bidfloorcur": "RUB", + "tagid": "65f0c2a2feb788d7", + "displaymanager": "Fyber", + "displaymanagerver": "10.1.1", + "banner": { + "api": [ + 4,5 + ], + "mimes": [ + "application/javascript", + "text/html", + "text/javascript", + "image/png", + "image/jpeg", + "image/gif" + ] + }, + "instl": 1 + } + ], + "app": { + "privacypolicy": 1, + "paid": 0, + "id": "1757830", + "name": "some-app-name", + "bundle": "some-app-bundle", + "storeurl": "some-store-url", + "cat": [ + + "IAB1-1" + ], + "publisher": { + "id": "gambling" + } + }, + "device": { + "dnt": 0, + "devicetype": 4, + "h": 980, + "w": 350, + "connectiontype": 2, + "ua": "Mozilla/5.0 (Linux; Android 10; YAL-L21 Build/HUAWEIYAL-L21; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.131 Mobile Safari/537.36", + "ip": "95.104.196.182", + "make": "Huawei", + "model": "YAL-L21", + "os": "Android", + "osv": "10.0", + "ifa": "6cecfc3c-de97-4861-ba6c-41a9dc94b391", + "geo": { + "country": "RUS" + } + }, + "user": { + "id": "6cecfc3c-de97-4861-ba6c-41a9dc94b391" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "bid": [ + { + "id": "36", + "impid": "1", + "price": 150, + "nurl": "some-test-nurl", + "burl": "some-test-burl", + "adm": "some-test-adm", + "adid": "36", + "adomain": [ + "app.apple.com" + ], + "crid": "36", + "mtype": 1 + } + ], + "seat": "boldwin" + } + ], + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "36", + "impid": "1", + "price": 150, + "nurl": "some-test-nurl", + "burl": "some-test-burl", + "adm": "some-test-adm", + "adid": "36", + "adomain": [ + "app.apple.com" + ], + "crid": "36", + "mtype": 1 + }, + "type": "banner" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/zentotem/zentotemtest/exemplary/banner-201-202-203.json b/adapters/zentotem/zentotemtest/exemplary/banner-201-202-203.json new file mode 100644 index 00000000000..b985d8b1412 --- /dev/null +++ b/adapters/zentotem/zentotemtest/exemplary/banner-201-202-203.json @@ -0,0 +1,196 @@ +{ + "mockBidRequest": { + "id": "058e84c8-3684-4725-be57-6a211fb8abc3", + "at": 2, + "bcat": [ "IAB8-18", "IAB8-5", "IAB9-9" ], + "cur": [ + "RUB" + ], + "tmax": 250, + "imp": [ + { + "id": "test-imp-id", + "bidfloor": 10, + "bidfloorcur": "RUB", + "tagid": "65f0c2a2feb788d7", + "displaymanager": "Fyber", + "displaymanagerver": "10.1.1", + "banner": { + "api": [ + 4, 5 + ], + "mimes": [ + "application/javascript", + "text/html", + "text/javascript", + "image/png", + "image/jpeg", + "image/gif" + ] + } + } + ], + "app": { + "privacypolicy": 1, + "paid": 0, + "id": "1757830", + "name": "some-app-name", + "bundle": "some-app-bundle", + "storeurl": "some-store-url", + "cat": [ + + "IAB1-1" + ], + "publisher": { + "id": "gambling" + } + }, + "device": { + "dnt": 0, + "devicetype": 4, + "h": 980, + "w": 350, + "connectiontype": 2, + "ua": "Mozilla/5.0 (Linux; Android 10; YAL-L21 Build/HUAWEIYAL-L21; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.131 Mobile Safari/537.36", + "ip": "95.104.196.182", + "make": "Huawei", + "model": "YAL-L21", + "os": "Android", + "osv": "10.0", + "ifa": "6cecfc3c-de97-4861-ba6c-41a9dc94b391", + "geo": { + "country": "RUS" + } + }, + "user": { + "id": "6cecfc3c-de97-4861-ba6c-41a9dc94b391" + } + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://rtb.zentotem.net/bid?sspuid=cqlnvfk00bhs0b6rci6g", + "body": { + "id": "058e84c8-3684-4725-be57-6a211fb8abc3", + "at": 2, + "bcat": [ "IAB8-18", "IAB8-5", "IAB9-9" ], + "cur": [ + "RUB" + ], + "tmax": 250, + "imp": [ + { + "id": "test-imp-id", + "bidfloor": 10, + "bidfloorcur": "RUB", + "tagid": "65f0c2a2feb788d7", + "displaymanager": "Fyber", + "displaymanagerver": "10.1.1", + "banner": { + "api": [ + 4, 5 + ], + "mimes": [ + "application/javascript", + "text/html", + "text/javascript", + "image/png", + "image/jpeg", + "image/gif" + ] + } + } + ], + "app": { + "privacypolicy": 1, + "paid": 0, + "id": "1757830", + "name": "some-app-name", + "bundle": "some-app-bundle", + "storeurl": "some-store-url", + "cat": [ + + "IAB1-1" + ], + "publisher": { + "id": "gambling" + } + }, + "device": { + "dnt": 0, + "devicetype": 4, + "h": 980, + "w": 350, + "connectiontype": 2, + "ua": "Mozilla/5.0 (Linux; Android 10; YAL-L21 Build/HUAWEIYAL-L21; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.131 Mobile Safari/537.36", + "ip": "95.104.196.182", + "make": "Huawei", + "model": "YAL-L21", + "os": "Android", + "osv": "10.0", + "ifa": "6cecfc3c-de97-4861-ba6c-41a9dc94b391", + "geo": { + "country": "RUS" + } + }, + "user": { + "id": "6cecfc3c-de97-4861-ba6c-41a9dc94b391" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "bid": [ + { + "id": "38", + "impid": "1", + "price": 150, + "nurl": "some-test-nurl", + "burl": "some-test-burl", + "adm": "some-test-adm", + "adid": "38", + "adomain": [ + "app.apple.com" + ], + "crid": "38", + "mtype": 1 + } + ], + "seat": "boldwin" + } + ], + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "38", + "impid": "1", + "price": 150, + "nurl": "some-test-nurl", + "burl": "some-test-burl", + "adm": "some-test-adm", + "adid": "38", + "adomain": [ + "app.apple.com" + ], + "crid": "38", + "mtype": 1 + }, + "type": "banner" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/zentotem/zentotemtest/exemplary/banner-207.json b/adapters/zentotem/zentotemtest/exemplary/banner-207.json new file mode 100644 index 00000000000..f516cbb2d36 --- /dev/null +++ b/adapters/zentotem/zentotemtest/exemplary/banner-207.json @@ -0,0 +1,204 @@ +{ + "mockBidRequest": { + "id": "test-imp-id", + "at": 2, + "bcat": [ "IAB8-18", "IAB8-5", "IAB9-9" ], + "cur": [ + "RUB" + ], + "tmax": 250, + "imp": [ + { + "id": "test-imp-id", + "bidfloor": 10, + "bidfloorcur": "RUB", + "tagid": "65f0c2a2feb788d7", + "displaymanager": "Fyber", + "displaymanagerver": "10.1.1", + "banner": { + "w": 320, + "h": 50, + "api": [ + 5 + ], + "mimes": [ + "application/javascript", + "text/html", + "text/javascript", + "image/png", + "image/jpeg", + "image/gif" + ] + } + } + ], + "app": { + "privacypolicy": 1, + "paid": 0, + "id": "1757830", + "name": "some-app-name", + "bundle": "some-app-bundle", + "storeurl": "some-store-url", + "cat": [ + + "IAB1-1" + ], + "publisher": { + "id": "gambling" + } + }, + "device": { + "dnt": 0, + "devicetype": 4, + "h": 980, + "w": 350, + "connectiontype": 2, + "ua": "Mozilla/5.0 (Linux; Android 10; YAL-L21 Build/HUAWEIYAL-L21; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.131 Mobile Safari/537.36", + "ip": "95.104.196.182", + "make": "Huawei", + "model": "YAL-L21", + "os": "Android", + "osv": "10.0", + "ifa": "6cecfc3c-de97-4861-ba6c-41a9dc94b391", + "geo": { + "country": "RUS" + } + }, + "user": { + "id": "6cecfc3c-de97-4861-ba6c-41a9dc94b391" + } + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://rtb.zentotem.net/bid?sspuid=cqlnvfk00bhs0b6rci6g", + "body": { + "id": "test-imp-id", + "at": 2, + "bcat": [ "IAB8-18", "IAB8-5", "IAB9-9" ], + "cur": [ + "RUB" + ], + "tmax": 250, + "imp": [ + { + "id": "test-imp-id", + "bidfloor": 10, + "bidfloorcur": "RUB", + "tagid": "65f0c2a2feb788d7", + "displaymanager": "Fyber", + "displaymanagerver": "10.1.1", + "banner": { + "w": 320, + "h": 50, + "api": [ + 5 + ], + "mimes": [ + "application/javascript", + "text/html", + "text/javascript", + "image/png", + "image/jpeg", + "image/gif" + ] + } + } + ], + "app": { + "privacypolicy": 1, + "paid": 0, + "id": "1757830", + "name": "some-app-name", + "bundle": "some-app-bundle", + "storeurl": "some-store-url", + "cat": [ + + "IAB1-1" + ], + "publisher": { + "id": "gambling" + } + }, + "device": { + "dnt": 0, + "devicetype": 4, + "h": 980, + "w": 350, + "connectiontype": 2, + "ua": "Mozilla/5.0 (Linux; Android 10; YAL-L21 Build/HUAWEIYAL-L21; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.131 Mobile Safari/537.36", + "ip": "95.104.196.182", + "make": "Huawei", + "model": "YAL-L21", + "os": "Android", + "osv": "10.0", + "ifa": "6cecfc3c-de97-4861-ba6c-41a9dc94b391", + "geo": { + "country": "RUS" + } + }, + "user": { + "id": "6cecfc3c-de97-4861-ba6c-41a9dc94b391" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "bid": [ + { + "id": "40", + "impid": "1", + "price": 150, + "nurl": "some-test-nurl", + "burl": "some-test-burl", + "adm": "some-test-adm", + "adid": "40", + "adomain": [ + "app.apple.com" + ], + "crid": "40", + "w": 320, + "h": 50, + "mtype": 1 + } + ], + "seat": "boldwin" + } + ], + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "40", + "impid": "1", + "price": 150, + "nurl": "some-test-nurl", + "burl": "some-test-burl", + "adm": "some-test-adm", + "adid": "40", + "adomain": [ + "app.apple.com" + ], + "crid": "40", + "w": 320, + "h": 50, + "mtype": 1 + }, + "type": "banner" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/zentotem/zentotemtest/exemplary/native.json b/adapters/zentotem/zentotemtest/exemplary/native.json new file mode 100644 index 00000000000..916e3badefc --- /dev/null +++ b/adapters/zentotem/zentotemtest/exemplary/native.json @@ -0,0 +1,166 @@ +{ + "mockBidRequest": { + "id": "o37934lssd34fgd", + "cur": [ + "USD", + "RUB" + ], + "at": 2, + "imp": [ + { + "id": "test-imp-id", + "bidfloor": 0.25, + "bidfloorcur": "USD", + "tagid": "ierui234fdfdf", + "secure": 1, + "native": { + "request": "{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":25}},{\"id\":2,\"data\":{\"type\":12,\"len\":15}},{\"id\":3,\"required\":1,\"img\":{\"type\":3,\"wmin\":1200,\"hmin\":627,\"mimes\":[\"image\/png\",\"image\/jpeg\",\"image\/gif\",\"text\/html\"]}},{\"id\":4,\"data\":{\"type\":2,\"len\":90}}],\"eventtrackers\":[{\"event\":1,\"methods\":[1]}]}", + "ver": "1.2" + } + } + ], + "device": { + "w": 375, + "h": 667, + "ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/112.0.5615.46 Mobile/15E148 Safari/604.1", + "ip": "69.75.122.146", + "ifa": "460384F3-D3B0-47CA-8090-F120F270A8B7", + "language": "en", + "geo": { + "country": "USA", + "region": "CA", + "city": "Los Angeles" + } + }, + "site": { + "id": "9fu48u347ru34o", + "domain": "some-domain", + "page": "some-page", + "publisher": { + "id": "p-93dj34di3344" + }, + "cat": [ + "IAB12", + "IAB17-12" + ] + }, + "user": { + "id": "d92a55e6-3eda-44c4-a448-14830a4c6838", + "buyeruid": "213ba1a2425be71ec5080b1d64b8450c" + } + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://rtb.zentotem.net/bid?sspuid=cqlnvfk00bhs0b6rci6g", + "body": { + "id": "o37934lssd34fgd", + "cur": [ + "USD", + "RUB" + ], + "at": 2, + "imp": [ + { + "id": "test-imp-id", + "bidfloor": 0.25, + "bidfloorcur": "USD", + "tagid": "ierui234fdfdf", + "secure": 1, + "native": { + "request": "{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":25}},{\"id\":2,\"data\":{\"type\":12,\"len\":15}},{\"id\":3,\"required\":1,\"img\":{\"type\":3,\"wmin\":1200,\"hmin\":627,\"mimes\":[\"image\/png\",\"image\/jpeg\",\"image\/gif\",\"text\/html\"]}},{\"id\":4,\"data\":{\"type\":2,\"len\":90}}],\"eventtrackers\":[{\"event\":1,\"methods\":[1]}]}", + "ver": "1.2" + } + } + ], + "device": { + "w": 375, + "h": 667, + "ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/112.0.5615.46 Mobile/15E148 Safari/604.1", + "ip": "69.75.122.146", + "ifa": "460384F3-D3B0-47CA-8090-F120F270A8B7", + "language": "en", + "geo": { + "country": "USA", + "region": "CA", + "city": "Los Angeles" + } + }, + "site": { + "id": "9fu48u347ru34o", + "domain": "some-domain", + "page": "some-page", + "publisher": { + "id": "p-93dj34di3344" + }, + "cat": [ + "IAB12", + "IAB17-12" + ] + }, + "user": { + "id": "d92a55e6-3eda-44c4-a448-14830a4c6838", + "buyeruid": "213ba1a2425be71ec5080b1d64b8450c" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "bid": [ + { + "id": "40", + "impid": "1", + "price": 150, + "nurl": "some-test-nurl", + "burl": "some-test-burl", + "adm": "some-test-adm", + "adid": "40", + "adomain": [ + "app.apple.com" + ], + "crid": "40", + "w": 320, + "h": 50, + "mtype": 4 + } + ], + "seat": "boldwin" + } + ], + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "40", + "impid": "1", + "price": 150, + "nurl": "some-test-nurl", + "burl": "some-test-burl", + "adm": "some-test-adm", + "adid": "40", + "adomain": [ + "app.apple.com" + ], + "crid": "40", + "w": 320, + "h": 50, + "mtype": 4 + }, + "type": "native" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/zentotem/zentotemtest/exemplary/video-300.json b/adapters/zentotem/zentotemtest/exemplary/video-300.json new file mode 100644 index 00000000000..09c74fdb82c --- /dev/null +++ b/adapters/zentotem/zentotemtest/exemplary/video-300.json @@ -0,0 +1,202 @@ +{ + "mockBidRequest": { + "id": "058e84c8-3684-4725-be57-6a211fb8abc3", + "at": 2, + "bcat": [ "IAB8-18", "IAB8-5", "IAB9-9" ], + "cur": [ + "RUB" + ], + "tmax": 250, + "imp": [ + { + "id": "test-imp-id", + "video": { + "mimes": [ + "video/mp4" + ], + "protocols": [ + 2, + 3 + ], + "w": 640, + "h": 360, + "linearity": 1, + "skip": 1, + "sequence": 1, + "boxingallowed": 1, + "placement": 1 + }, + "tagid": "27208-0", + "bidfloor": 0.35, + "secure": 1 + } + ], + "app": { + "privacypolicy": 1, + "paid": 0, + "id": "1757830", + "name": "some-app-name", + "bundle": "some-app-bundle", + "storeurl": "some-store-url", + "cat": [ + + "IAB1-1" + ], + "publisher": { + "id": "gambling" + } + }, + "device": { + "dnt": 0, + "devicetype": 4, + "h": 980, + "w": 350, + "connectiontype": 2, + "ua": "Mozilla/5.0 (Linux; Android 10; YAL-L21 Build/HUAWEIYAL-L21; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.131 Mobile Safari/537.36", + "ip": "95.104.196.182", + "make": "Huawei", + "model": "YAL-L21", + "os": "Android", + "osv": "10.0", + "ifa": "6cecfc3c-de97-4861-ba6c-41a9dc94b391", + "geo": { + "country": "RUS" + } + }, + "user": { + "id": "6cecfc3c-de97-4861-ba6c-41a9dc94b391" + } + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://rtb.zentotem.net/bid?sspuid=cqlnvfk00bhs0b6rci6g", + "body": { + "id": "058e84c8-3684-4725-be57-6a211fb8abc3", + "at": 2, + "bcat": [ "IAB8-18", "IAB8-5", "IAB9-9" ], + "cur": [ + "RUB" + ], + "tmax": 250, + "imp": [ + { + "id": "test-imp-id", + "video": { + "mimes": [ + "video/mp4" + ], + "protocols": [ + 2, + 3 + ], + "w": 640, + "h": 360, + "linearity": 1, + "skip": 1, + "sequence": 1, + "boxingallowed": 1, + "placement": 1 + }, + "tagid": "27208-0", + "bidfloor": 0.35, + "secure": 1 + } + ], + "app": { + "privacypolicy": 1, + "paid": 0, + "id": "1757830", + "name": "some-app-name", + "bundle": "some-app-bundle", + "storeurl": "some-store-url", + "cat": [ + + "IAB1-1" + ], + "publisher": { + "id": "gambling" + } + }, + "device": { + "dnt": 0, + "devicetype": 4, + "h": 980, + "w": 350, + "connectiontype": 2, + "ua": "Mozilla/5.0 (Linux; Android 10; YAL-L21 Build/HUAWEIYAL-L21; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.131 Mobile Safari/537.36", + "ip": "95.104.196.182", + "make": "Huawei", + "model": "YAL-L21", + "os": "Android", + "osv": "10.0", + "ifa": "6cecfc3c-de97-4861-ba6c-41a9dc94b391", + "geo": { + "country": "RUS" + } + }, + "user": { + "id": "6cecfc3c-de97-4861-ba6c-41a9dc94b391" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "bid": [ + { + "id": "43", + "impid": "8f3ac58c-1e03-4264-8619-f79ddb137110", + "price": 150, + "nurl": "some-test-nurl", + "burl": "some-test-burl", + "adm": "some-test-adm", + "adid": "43", + "adomain": [ + "app.apple.com" + ], + "crid": "43", + "w": 1280, + "h": 720, + "mtype": 2 + } + ], + "seat": "boldwin" + } + ], + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "43", + "impid": "8f3ac58c-1e03-4264-8619-f79ddb137110", + "price": 150, + "nurl": "some-test-nurl", + "burl": "some-test-burl", + "adm": "some-test-adm", + "adid": "43", + "adomain": [ + "app.apple.com" + ], + "crid": "43", + "w": 1280, + "h": 720, + "mtype": 2 + }, + "type": "video" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/zentotem/zentotemtest/exemplary/video-301.json b/adapters/zentotem/zentotemtest/exemplary/video-301.json new file mode 100644 index 00000000000..aca6d4bd172 --- /dev/null +++ b/adapters/zentotem/zentotemtest/exemplary/video-301.json @@ -0,0 +1,202 @@ +{ + "mockBidRequest": { + "id": "058e84c8-3684-4725-be57-6a211fb8abc3", + "at": 2, + "bcat": [ "IAB8-18", "IAB8-5", "IAB9-9" ], + "cur": [ + "RUB" + ], + "tmax": 250, + "imp": [ + { + "id": "test-imp-id", + "video": { + "mimes": [ + "video/mp4" + ], + "protocols": [ + 2, + 3 + ], + "w": 640, + "h": 360, + "linearity": 1, + "skip": 1, + "sequence": 1, + "boxingallowed": 1, + "placement": 1 + }, + "tagid": "27208-0", + "bidfloor": 0.35, + "secure": 1 + } + ], + "app": { + "privacypolicy": 1, + "paid": 0, + "id": "1757830", + "name": "some-app-name", + "bundle": "some-app-bundle", + "storeurl": "some-store-url", + "cat": [ + + "IAB1-1" + ], + "publisher": { + "id": "gambling" + } + }, + "device": { + "dnt": 0, + "devicetype": 4, + "h": 980, + "w": 350, + "connectiontype": 2, + "ua": "Mozilla/5.0 (Linux; Android 10; YAL-L21 Build/HUAWEIYAL-L21; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.131 Mobile Safari/537.36", + "ip": "95.104.196.182", + "make": "Huawei", + "model": "YAL-L21", + "os": "Android", + "osv": "10.0", + "ifa": "6cecfc3c-de97-4861-ba6c-41a9dc94b391", + "geo": { + "country": "RUS" + } + }, + "user": { + "id": "6cecfc3c-de97-4861-ba6c-41a9dc94b391" + } + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://rtb.zentotem.net/bid?sspuid=cqlnvfk00bhs0b6rci6g", + "body": { + "id": "058e84c8-3684-4725-be57-6a211fb8abc3", + "at": 2, + "bcat": [ "IAB8-18", "IAB8-5", "IAB9-9" ], + "cur": [ + "RUB" + ], + "tmax": 250, + "imp": [ + { + "id": "test-imp-id", + "video": { + "mimes": [ + "video/mp4" + ], + "protocols": [ + 2, + 3 + ], + "w": 640, + "h": 360, + "linearity": 1, + "skip": 1, + "sequence": 1, + "boxingallowed": 1, + "placement": 1 + }, + "tagid": "27208-0", + "bidfloor": 0.35, + "secure": 1 + } + ], + "app": { + "privacypolicy": 1, + "paid": 0, + "id": "1757830", + "name": "some-app-name", + "bundle": "some-app-bundle", + "storeurl": "some-store-url", + "cat": [ + + "IAB1-1" + ], + "publisher": { + "id": "gambling" + } + }, + "device": { + "dnt": 0, + "devicetype": 4, + "h": 980, + "w": 350, + "connectiontype": 2, + "ua": "Mozilla/5.0 (Linux; Android 10; YAL-L21 Build/HUAWEIYAL-L21; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.131 Mobile Safari/537.36", + "ip": "95.104.196.182", + "make": "Huawei", + "model": "YAL-L21", + "os": "Android", + "osv": "10.0", + "ifa": "6cecfc3c-de97-4861-ba6c-41a9dc94b391", + "geo": { + "country": "RUS" + } + }, + "user": { + "id": "6cecfc3c-de97-4861-ba6c-41a9dc94b391" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "bid": [ + { + "id": "44", + "impid": "8f3ac58c-1e03-4264-8619-f79ddb137110", + "price": 150, + "nurl": "some-test-nurl", + "burl": "some-test-burl", + "adm": "some-test-adm", + "adid": "44", + "adomain": [ + "app.apple.com" + ], + "crid": "44", + "w": 1280, + "h": 720, + "mtype": 2 + } + ], + "seat": "boldwin" + } + ], + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "44", + "impid": "8f3ac58c-1e03-4264-8619-f79ddb137110", + "price": 150, + "nurl": "some-test-nurl", + "burl": "some-test-burl", + "adm": "some-test-adm", + "adid": "44", + "adomain": [ + "app.apple.com" + ], + "crid": "44", + "w": 1280, + "h": 720, + "mtype": 2 + }, + "type": "video" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/zentotem/zentotemtest/supplemental/bad-response.json b/adapters/zentotem/zentotemtest/supplemental/bad-response.json new file mode 100644 index 00000000000..377a0bdb803 --- /dev/null +++ b/adapters/zentotem/zentotemtest/supplemental/bad-response.json @@ -0,0 +1,154 @@ +{ + "mockBidRequest": { + "id": "058e84c8-3684-4725-be57-6a211fb8abc3", + "at": 2, + "bcat": [ "IAB8-18", "IAB8-5", "IAB9-9" ], + "cur": [ + "RUB" + ], + "tmax": 250, + "imp": [ + { + "id": "test-imp-id", + "bidfloor": 10, + "bidfloorcur": "RUB", + "tagid": "65f0c2a2feb788d7", + "displaymanager": "Fyber", + "displaymanagerver": "10.1.1", + "banner": { + "api": [ + 4, 5 + ], + "mimes": [ + "application/javascript", + "text/html", + "text/javascript", + "image/png", + "image/jpeg", + "image/gif" + ] + } + } + ], + "app": { + "privacypolicy": 1, + "paid": 0, + "id": "1757830", + "name": "some-app-name", + "bundle": "some-app-bundle", + "storeurl": "some-store-url", + "cat": [ + + "IAB1-1" + ], + "publisher": { + "id": "gambling" + } + }, + "device": { + "dnt": 0, + "devicetype": 4, + "h": 980, + "w": 350, + "connectiontype": 2, + "ua": "Mozilla/5.0 (Linux; Android 10; YAL-L21 Build/HUAWEIYAL-L21; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.131 Mobile Safari/537.36", + "ip": "95.104.196.182", + "make": "Huawei", + "model": "YAL-L21", + "os": "Android", + "osv": "10.0", + "ifa": "6cecfc3c-de97-4861-ba6c-41a9dc94b391", + "geo": { + "country": "RUS" + } + }, + "user": { + "id": "6cecfc3c-de97-4861-ba6c-41a9dc94b391" + } + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://rtb.zentotem.net/bid?sspuid=cqlnvfk00bhs0b6rci6g", + "body": { + "id": "058e84c8-3684-4725-be57-6a211fb8abc3", + "at": 2, + "bcat": [ "IAB8-18", "IAB8-5", "IAB9-9" ], + "cur": [ + "RUB" + ], + "tmax": 250, + "imp": [ + { + "id": "test-imp-id", + "bidfloor": 10, + "bidfloorcur": "RUB", + "tagid": "65f0c2a2feb788d7", + "displaymanager": "Fyber", + "displaymanagerver": "10.1.1", + "banner": { + "api": [ + 4, 5 + ], + "mimes": [ + "application/javascript", + "text/html", + "text/javascript", + "image/png", + "image/jpeg", + "image/gif" + ] + } + } + ], + "app": { + "privacypolicy": 1, + "paid": 0, + "id": "1757830", + "name": "some-app-name", + "bundle": "some-app-bundle", + "storeurl": "some-store-url", + "cat": [ + + "IAB1-1" + ], + "publisher": { + "id": "gambling" + } + }, + "device": { + "dnt": 0, + "devicetype": 4, + "h": 980, + "w": 350, + "connectiontype": 2, + "ua": "Mozilla/5.0 (Linux; Android 10; YAL-L21 Build/HUAWEIYAL-L21; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.131 Mobile Safari/537.36", + "ip": "95.104.196.182", + "make": "Huawei", + "model": "YAL-L21", + "os": "Android", + "osv": "10.0", + "ifa": "6cecfc3c-de97-4861-ba6c-41a9dc94b391", + "geo": { + "country": "RUS" + } + }, + "user": { + "id": "6cecfc3c-de97-4861-ba6c-41a9dc94b391" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": "{\"id\"data.lost" + } + } + ], + "expectedMakeBidsErrors": [ + { + "value": "json: cannot unmarshal string into Go value of type openrtb2.BidResponse", + "comparison": "literal" + } + ] +} \ No newline at end of file diff --git a/adapters/zentotem/zentotemtest/supplemental/banner-empty-width-height-204.json b/adapters/zentotem/zentotemtest/supplemental/banner-empty-width-height-204.json new file mode 100644 index 00000000000..77bd2712f1d --- /dev/null +++ b/adapters/zentotem/zentotemtest/supplemental/banner-empty-width-height-204.json @@ -0,0 +1,150 @@ +{ + "mockBidRequest": { + "id": "test-imp-id", + "at": 2, + "bcat": [ "IAB8-18", "IAB8-5", "IAB9-9" ], + "cur": [ + "RUB" + ], + "tmax": 250, + "imp": [ + { + "id": "test-imp-id", + "bidfloor": 10, + "bidfloorcur": "RUB", + "tagid": "65f0c2a2feb788d7", + "displaymanager": "Fyber", + "displaymanagerver": "10.1.1", + "banner": { + "api": [ + 5 + ], + "mimes": [ + "application/javascript", + "text/html", + "text/javascript", + "image/png", + "image/jpeg", + "image/gif" + ] + } + } + ], + "app": { + "privacypolicy": 1, + "paid": 0, + "id": "1757830", + "name": "some-app-name", + "bundle": "some-app-bundle", + "storeurl": "some-store-url", + "cat": [ + + "IAB1-1" + ], + "publisher": { + "id": "gambling" + } + }, + "device": { + "dnt": 0, + "devicetype": 4, + "h": 980, + "w": 350, + "connectiontype": 2, + "ua": "Mozilla/5.0 (Linux; Android 10; YAL-L21 Build/HUAWEIYAL-L21; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.131 Mobile Safari/537.36", + "ip": "95.104.196.182", + "make": "Huawei", + "model": "YAL-L21", + "os": "Android", + "osv": "10.0", + "ifa": "6cecfc3c-de97-4861-ba6c-41a9dc94b391", + "geo": { + "country": "RUS" + } + }, + "user": { + "id": "6cecfc3c-de97-4861-ba6c-41a9dc94b391" + } + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://rtb.zentotem.net/bid?sspuid=cqlnvfk00bhs0b6rci6g", + "body": { + "id": "test-imp-id", + "at": 2, + "bcat": [ "IAB8-18", "IAB8-5", "IAB9-9" ], + "cur": [ + "RUB" + ], + "tmax": 250, + "imp": [ + { + "id": "test-imp-id", + "bidfloor": 10, + "bidfloorcur": "RUB", + "tagid": "65f0c2a2feb788d7", + "displaymanager": "Fyber", + "displaymanagerver": "10.1.1", + "banner": { + "api": [ + 5 + ], + "mimes": [ + "application/javascript", + "text/html", + "text/javascript", + "image/png", + "image/jpeg", + "image/gif" + ] + } + } + ], + "app": { + "privacypolicy": 1, + "paid": 0, + "id": "1757830", + "name": "some-app-name", + "bundle": "some-app-bundle", + "storeurl": "some-store-url", + "cat": [ + + "IAB1-1" + ], + "publisher": { + "id": "gambling" + } + }, + "device": { + "dnt": 0, + "devicetype": 4, + "h": 980, + "w": 350, + "connectiontype": 2, + "ua": "Mozilla/5.0 (Linux; Android 10; YAL-L21 Build/HUAWEIYAL-L21; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.131 Mobile Safari/537.36", + "ip": "95.104.196.182", + "make": "Huawei", + "model": "YAL-L21", + "os": "Android", + "osv": "10.0", + "ifa": "6cecfc3c-de97-4861-ba6c-41a9dc94b391", + "geo": { + "country": "RUS" + } + }, + "user": { + "id": "6cecfc3c-de97-4861-ba6c-41a9dc94b391" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 204, + "body": {} + } + } + ], + "expectedBidResponses": [], + "expectedMakeBidsErrors": [] +} \ No newline at end of file diff --git a/adapters/zentotem/zentotemtest/supplemental/banner-invalid-height-204.json b/adapters/zentotem/zentotemtest/supplemental/banner-invalid-height-204.json new file mode 100644 index 00000000000..b000dc2c729 --- /dev/null +++ b/adapters/zentotem/zentotemtest/supplemental/banner-invalid-height-204.json @@ -0,0 +1,154 @@ +{ + "mockBidRequest": { + "id": "test-imp-id", + "at": 2, + "bcat": [ "IAB8-18", "IAB8-5", "IAB9-9" ], + "cur": [ + "RUB" + ], + "tmax": 250, + "imp": [ + { + "id": "test-imp-id", + "bidfloor": 10, + "bidfloorcur": "RUB", + "tagid": "65f0c2a2feb788d7", + "displaymanager": "Fyber", + "displaymanagerver": "10.1.1", + "banner": { + "w": 320, + "h": 0, + "api": [ + 5 + ], + "mimes": [ + "application/javascript", + "text/html", + "text/javascript", + "image/png", + "image/jpeg", + "image/gif" + ] + } + } + ], + "app": { + "privacypolicy": 1, + "paid": 0, + "id": "1757830", + "name": "some-app-name", + "bundle": "some-app-bundle", + "storeurl": "some-store-url", + "cat": [ + + "IAB1-1" + ], + "publisher": { + "id": "gambling" + } + }, + "device": { + "dnt": 0, + "devicetype": 4, + "h": 980, + "w": 350, + "connectiontype": 2, + "ua": "Mozilla/5.0 (Linux; Android 10; YAL-L21 Build/HUAWEIYAL-L21; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.131 Mobile Safari/537.36", + "ip": "95.104.196.182", + "make": "Huawei", + "model": "YAL-L21", + "os": "Android", + "osv": "10.0", + "ifa": "6cecfc3c-de97-4861-ba6c-41a9dc94b391", + "geo": { + "country": "RUS" + } + }, + "user": { + "id": "6cecfc3c-de97-4861-ba6c-41a9dc94b391" + } + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://rtb.zentotem.net/bid?sspuid=cqlnvfk00bhs0b6rci6g", + "body": { + "id": "test-imp-id", + "at": 2, + "bcat": [ "IAB8-18", "IAB8-5", "IAB9-9" ], + "cur": [ + "RUB" + ], + "tmax": 250, + "imp": [ + { + "id": "test-imp-id", + "bidfloor": 10, + "bidfloorcur": "RUB", + "tagid": "65f0c2a2feb788d7", + "displaymanager": "Fyber", + "displaymanagerver": "10.1.1", + "banner": { + "w": 320, + "h": 0, + "api": [ + 5 + ], + "mimes": [ + "application/javascript", + "text/html", + "text/javascript", + "image/png", + "image/jpeg", + "image/gif" + ] + } + } + ], + "app": { + "privacypolicy": 1, + "paid": 0, + "id": "1757830", + "name": "some-app-name", + "bundle": "some-app-bundle", + "storeurl": "some-store-url", + "cat": [ + + "IAB1-1" + ], + "publisher": { + "id": "gambling" + } + }, + "device": { + "dnt": 0, + "devicetype": 4, + "h": 980, + "w": 350, + "connectiontype": 2, + "ua": "Mozilla/5.0 (Linux; Android 10; YAL-L21 Build/HUAWEIYAL-L21; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.131 Mobile Safari/537.36", + "ip": "95.104.196.182", + "make": "Huawei", + "model": "YAL-L21", + "os": "Android", + "osv": "10.0", + "ifa": "6cecfc3c-de97-4861-ba6c-41a9dc94b391", + "geo": { + "country": "RUS" + } + }, + "user": { + "id": "6cecfc3c-de97-4861-ba6c-41a9dc94b391" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 204, + "body": {} + } + } + ], + "expectedBidResponses": [], + "expectedMakeBidsErrors": [] +} \ No newline at end of file diff --git a/adapters/zentotem/zentotemtest/supplemental/banner-invalid-width-204.json b/adapters/zentotem/zentotemtest/supplemental/banner-invalid-width-204.json new file mode 100644 index 00000000000..1152b7b0a0d --- /dev/null +++ b/adapters/zentotem/zentotemtest/supplemental/banner-invalid-width-204.json @@ -0,0 +1,154 @@ +{ + "mockBidRequest": { + "id": "test-imp-id", + "at": 2, + "bcat": [ "IAB8-18", "IAB8-5", "IAB9-9" ], + "cur": [ + "RUB" + ], + "tmax": 250, + "imp": [ + { + "id": "test-imp-id", + "bidfloor": 10, + "bidfloorcur": "RUB", + "tagid": "65f0c2a2feb788d7", + "displaymanager": "Fyber", + "displaymanagerver": "10.1.1", + "banner": { + "w": 0, + "h": 50, + "api": [ + 5 + ], + "mimes": [ + "application/javascript", + "text/html", + "text/javascript", + "image/png", + "image/jpeg", + "image/gif" + ] + } + } + ], + "app": { + "privacypolicy": 1, + "paid": 0, + "id": "1757830", + "name": "some-app-name", + "bundle": "some-app-bundle", + "storeurl": "some-store-url", + "cat": [ + + "IAB1-1" + ], + "publisher": { + "id": "gambling" + } + }, + "device": { + "dnt": 0, + "devicetype": 4, + "h": 980, + "w": 350, + "connectiontype": 2, + "ua": "Mozilla/5.0 (Linux; Android 10; YAL-L21 Build/HUAWEIYAL-L21; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.131 Mobile Safari/537.36", + "ip": "95.104.196.182", + "make": "Huawei", + "model": "YAL-L21", + "os": "Android", + "osv": "10.0", + "ifa": "6cecfc3c-de97-4861-ba6c-41a9dc94b391", + "geo": { + "country": "RUS" + } + }, + "user": { + "id": "6cecfc3c-de97-4861-ba6c-41a9dc94b391" + } + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://rtb.zentotem.net/bid?sspuid=cqlnvfk00bhs0b6rci6g", + "body": { + "id": "test-imp-id", + "at": 2, + "bcat": [ "IAB8-18", "IAB8-5", "IAB9-9" ], + "cur": [ + "RUB" + ], + "tmax": 250, + "imp": [ + { + "id": "test-imp-id", + "bidfloor": 10, + "bidfloorcur": "RUB", + "tagid": "65f0c2a2feb788d7", + "displaymanager": "Fyber", + "displaymanagerver": "10.1.1", + "banner": { + "w": 0, + "h": 50, + "api": [ + 5 + ], + "mimes": [ + "application/javascript", + "text/html", + "text/javascript", + "image/png", + "image/jpeg", + "image/gif" + ] + } + } + ], + "app": { + "privacypolicy": 1, + "paid": 0, + "id": "1757830", + "name": "some-app-name", + "bundle": "some-app-bundle", + "storeurl": "some-store-url", + "cat": [ + + "IAB1-1" + ], + "publisher": { + "id": "gambling" + } + }, + "device": { + "dnt": 0, + "devicetype": 4, + "h": 980, + "w": 350, + "connectiontype": 2, + "ua": "Mozilla/5.0 (Linux; Android 10; YAL-L21 Build/HUAWEIYAL-L21; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.131 Mobile Safari/537.36", + "ip": "95.104.196.182", + "make": "Huawei", + "model": "YAL-L21", + "os": "Android", + "osv": "10.0", + "ifa": "6cecfc3c-de97-4861-ba6c-41a9dc94b391", + "geo": { + "country": "RUS" + } + }, + "user": { + "id": "6cecfc3c-de97-4861-ba6c-41a9dc94b391" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 204, + "body": {} + } + } + ], + "expectedBidResponses": [], + "expectedMakeBidsErrors": [] +} \ No newline at end of file diff --git a/adapters/zentotem/zentotemtest/supplemental/empty-imp-400.json b/adapters/zentotem/zentotemtest/supplemental/empty-imp-400.json new file mode 100644 index 00000000000..26fbf6236c7 --- /dev/null +++ b/adapters/zentotem/zentotemtest/supplemental/empty-imp-400.json @@ -0,0 +1,118 @@ +{ + "mockBidRequest": { + "id": "058e84c8-3684-4725-be57-6a211fb8abc3", + "at": 2, + "bcat": [ "IAB8-18", "IAB8-5", "IAB9-9" ], + "cur": [ + "RUB" + ], + "tmax": 250, + "imp": [ + { + "id": "test-imp-id" + } + ], + "app": { + "privacypolicy": 1, + "paid": 0, + "id": "1757830", + "name": "some-app-name", + "bundle": "some-app-bundle", + "storeurl": "some-store-url", + "cat": [ + + "IAB1-1" + ], + "publisher": { + "id": "gambling" + } + }, + "device": { + "dnt": 0, + "devicetype": 4, + "h": 980, + "w": 350, + "connectiontype": 2, + "ua": "Mozilla/5.0 (Linux; Android 10; YAL-L21 Build/HUAWEIYAL-L21; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.131 Mobile Safari/537.36", + "ip": "95.104.196.182", + "make": "Huawei", + "model": "YAL-L21", + "os": "Android", + "osv": "10.0", + "ifa": "6cecfc3c-de97-4861-ba6c-41a9dc94b391", + "geo": { + "country": "RUS" + } + }, + "user": { + "id": "6cecfc3c-de97-4861-ba6c-41a9dc94b391" + } + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://rtb.zentotem.net/bid?sspuid=cqlnvfk00bhs0b6rci6g", + "body": { + "id": "058e84c8-3684-4725-be57-6a211fb8abc3", + "at": 2, + "bcat": [ "IAB8-18", "IAB8-5", "IAB9-9" ], + "cur": [ + "RUB" + ], + "tmax": 250, + "imp": [ + { + "id": "test-imp-id" + } + ], + "app": { + "privacypolicy": 1, + "paid": 0, + "id": "1757830", + "name": "some-app-name", + "bundle": "some-app-bundle", + "storeurl": "some-store-url", + "cat": [ + + "IAB1-1" + ], + "publisher": { + "id": "gambling" + } + }, + "device": { + "dnt": 0, + "devicetype": 4, + "h": 980, + "w": 350, + "connectiontype": 2, + "ua": "Mozilla/5.0 (Linux; Android 10; YAL-L21 Build/HUAWEIYAL-L21; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.131 Mobile Safari/537.36", + "ip": "95.104.196.182", + "make": "Huawei", + "model": "YAL-L21", + "os": "Android", + "osv": "10.0", + "ifa": "6cecfc3c-de97-4861-ba6c-41a9dc94b391", + "geo": { + "country": "RUS" + } + }, + "user": { + "id": "6cecfc3c-de97-4861-ba6c-41a9dc94b391" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 400 + } + } + ], + "expectedBidResponses": [], + "expectedMakeBidsErrors": [ + { + "value": "Unexpected status code: 400. Run with request.debug = 1 for more info", + "comparison": "literal" + } + ] +} \ No newline at end of file diff --git a/adapters/zentotem/zentotemtest/supplemental/empty-imp-native-400.json b/adapters/zentotem/zentotemtest/supplemental/empty-imp-native-400.json new file mode 100644 index 00000000000..a6a42c5833e --- /dev/null +++ b/adapters/zentotem/zentotemtest/supplemental/empty-imp-native-400.json @@ -0,0 +1,112 @@ +{ + "mockBidRequest": { + "id": "o37934lssd34fgd", + "cur": [ + "USD", + "RUB" + ], + "at": 2, + "imp": [ + { + "id": "test-imp-id", + "bidfloor": 0.25, + "bidfloorcur": "USD", + "tagid": "ierui234fdfdf", + "secure": 1 + } + ], + "device": { + "w": 375, + "h": 667, + "ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/112.0.5615.46 Mobile/15E148 Safari/604.1", + "ip": "69.75.122.146", + "ifa": "460384F3-D3B0-47CA-8090-F120F270A8B7", + "language": "en", + "geo": { + "country": "USA", + "region": "CA", + "city": "Los Angeles" + } + }, + "site": { + "id": "9fu48u347ru34o", + "domain": "some-domain", + "page": "some-page", + "publisher": { + "id": "p-93dj34di3344" + }, + "cat": [ + "IAB12", + "IAB17-12" + ] + }, + "user": { + "id": "d92a55e6-3eda-44c4-a448-14830a4c6838", + "buyeruid": "213ba1a2425be71ec5080b1d64b8450c" + } + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://rtb.zentotem.net/bid?sspuid=cqlnvfk00bhs0b6rci6g", + "body": { + "id": "o37934lssd34fgd", + "cur": [ + "USD", + "RUB" + ], + "at": 2, + "imp": [ + { + "id": "test-imp-id", + "bidfloor": 0.25, + "bidfloorcur": "USD", + "tagid": "ierui234fdfdf", + "secure": 1 + } + ], + "device": { + "w": 375, + "h": 667, + "ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/112.0.5615.46 Mobile/15E148 Safari/604.1", + "ip": "69.75.122.146", + "ifa": "460384F3-D3B0-47CA-8090-F120F270A8B7", + "language": "en", + "geo": { + "country": "USA", + "region": "CA", + "city": "Los Angeles" + } + }, + "site": { + "id": "9fu48u347ru34o", + "domain": "some-domain", + "page": "some-page", + "publisher": { + "id": "p-93dj34di3344" + }, + "cat": [ + "IAB12", + "IAB17-12" + ] + }, + "user": { + "id": "d92a55e6-3eda-44c4-a448-14830a4c6838", + "buyeruid": "213ba1a2425be71ec5080b1d64b8450c" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 400 + } + } + ], + "expectedBidResponses": [], + "expectedMakeBidsErrors": [ + { + "value": "Unexpected status code: 400. Run with request.debug = 1 for more info", + "comparison": "literal" + } + ] +} \ No newline at end of file diff --git a/adapters/zentotem/zentotemtest/supplemental/empty-imp-ver-native-400.json b/adapters/zentotem/zentotemtest/supplemental/empty-imp-ver-native-400.json new file mode 100644 index 00000000000..68dcdbb0e61 --- /dev/null +++ b/adapters/zentotem/zentotemtest/supplemental/empty-imp-ver-native-400.json @@ -0,0 +1,118 @@ +{ + "mockBidRequest": { + "id": "o37934lssd34fgd", + "cur": [ + "USD", + "RUB" + ], + "at": 2, + "imp": [ + { + "id": "test-imp-id", + "bidfloor": 0.25, + "bidfloorcur": "USD", + "tagid": "ierui234fdfdf", + "secure": 1, + "native": { + "request": "{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":25}},{\"id\":2,\"data\":{\"type\":12,\"len\":15}},{\"id\":3,\"required\":1,\"img\":{\"type\":3,\"wmin\":1200,\"hmin\":627,\"mimes\":[\"image\/png\",\"image\/jpeg\",\"image\/gif\",\"text\/html\"]}},{\"id\":4,\"data\":{\"type\":2,\"len\":90}}],\"eventtrackers\":[{\"event\":1,\"methods\":[1]}]}" + } + } + ], + "device": { + "w": 375, + "h": 667, + "ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/112.0.5615.46 Mobile/15E148 Safari/604.1", + "ip": "69.75.122.146", + "ifa": "460384F3-D3B0-47CA-8090-F120F270A8B7", + "language": "en", + "geo": { + "country": "USA", + "region": "CA", + "city": "Los Angeles" + } + }, + "site": { + "id": "9fu48u347ru34o", + "domain": "some-domain", + "page": "some-page", + "publisher": { + "id": "p-93dj34di3344" + }, + "cat": [ + "IAB12", + "IAB17-12" + ] + }, + "user": { + "id": "d92a55e6-3eda-44c4-a448-14830a4c6838", + "buyeruid": "213ba1a2425be71ec5080b1d64b8450c" + } + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://rtb.zentotem.net/bid?sspuid=cqlnvfk00bhs0b6rci6g", + "body": { + "id": "o37934lssd34fgd", + "cur": [ + "USD", + "RUB" + ], + "at": 2, + "imp": [ + { + "id": "test-imp-id", + "bidfloor": 0.25, + "bidfloorcur": "USD", + "tagid": "ierui234fdfdf", + "secure": 1, + "native": { + "request": "{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":25}},{\"id\":2,\"data\":{\"type\":12,\"len\":15}},{\"id\":3,\"required\":1,\"img\":{\"type\":3,\"wmin\":1200,\"hmin\":627,\"mimes\":[\"image\/png\",\"image\/jpeg\",\"image\/gif\",\"text\/html\"]}},{\"id\":4,\"data\":{\"type\":2,\"len\":90}}],\"eventtrackers\":[{\"event\":1,\"methods\":[1]}]}" + } + } + ], + "device": { + "w": 375, + "h": 667, + "ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/112.0.5615.46 Mobile/15E148 Safari/604.1", + "ip": "69.75.122.146", + "ifa": "460384F3-D3B0-47CA-8090-F120F270A8B7", + "language": "en", + "geo": { + "country": "USA", + "region": "CA", + "city": "Los Angeles" + } + }, + "site": { + "id": "9fu48u347ru34o", + "domain": "some-domain", + "page": "some-page", + "publisher": { + "id": "p-93dj34di3344" + }, + "cat": [ + "IAB12", + "IAB17-12" + ] + }, + "user": { + "id": "d92a55e6-3eda-44c4-a448-14830a4c6838", + "buyeruid": "213ba1a2425be71ec5080b1d64b8450c" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 400 + } + } + ], + "expectedBidResponses": [], + "expectedMakeBidsErrors": [ + { + "value": "Unexpected status code: 400. Run with request.debug = 1 for more info", + "comparison": "literal" + } + ] +} \ No newline at end of file diff --git a/adapters/zentotem/zentotemtest/supplemental/video-empty-protocol-204.json b/adapters/zentotem/zentotemtest/supplemental/video-empty-protocol-204.json new file mode 100644 index 00000000000..0cd07e57add --- /dev/null +++ b/adapters/zentotem/zentotemtest/supplemental/video-empty-protocol-204.json @@ -0,0 +1,144 @@ +{ + "mockBidRequest": { + "id": "058e84c8-3684-4725-be57-6a211fb8abc3", + "at": 2, + "bcat": [ "IAB8-18", "IAB8-5", "IAB9-9" ], + "cur": [ + "RUB" + ], + "tmax": 250, + "imp": [ + { + "id": "test-imp-id", + "video": { + "mimes": [ + "video/mp4" + ], + "w": 640, + "h": 360, + "linearity": 1, + "skip": 1, + "sequence": 1, + "boxingallowed": 1, + "placement": 1 + }, + "tagid": "27208-0", + "bidfloor": 0.35, + "secure": 1 + } + ], + "app": { + "privacypolicy": 1, + "paid": 0, + "id": "1757830", + "name": "some-app-name", + "bundle": "some-app-bundle", + "storeurl": "some-store-url", + "cat": [ + + "IAB1-1" + ], + "publisher": { + "id": "gambling" + } + }, + "device": { + "dnt": 0, + "devicetype": 4, + "h": 980, + "w": 350, + "connectiontype": 2, + "ua": "Mozilla/5.0 (Linux; Android 10; YAL-L21 Build/HUAWEIYAL-L21; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.131 Mobile Safari/537.36", + "ip": "95.104.196.182", + "make": "Huawei", + "model": "YAL-L21", + "os": "Android", + "osv": "10.0", + "ifa": "6cecfc3c-de97-4861-ba6c-41a9dc94b391", + "geo": { + "country": "RUS" + } + }, + "user": { + "id": "6cecfc3c-de97-4861-ba6c-41a9dc94b391" + } + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://rtb.zentotem.net/bid?sspuid=cqlnvfk00bhs0b6rci6g", + "body": { + "id": "058e84c8-3684-4725-be57-6a211fb8abc3", + "at": 2, + "bcat": [ "IAB8-18", "IAB8-5", "IAB9-9" ], + "cur": [ + "RUB" + ], + "tmax": 250, + "imp": [ + { + "id": "test-imp-id", + "video": { + "mimes": [ + "video/mp4" + ], + "w": 640, + "h": 360, + "linearity": 1, + "skip": 1, + "sequence": 1, + "boxingallowed": 1, + "placement": 1 + }, + "tagid": "27208-0", + "bidfloor": 0.35, + "secure": 1 + } + ], + "app": { + "privacypolicy": 1, + "paid": 0, + "id": "1757830", + "name": "some-app-name", + "bundle": "some-app-bundle", + "storeurl": "some-store-url", + "cat": [ + + "IAB1-1" + ], + "publisher": { + "id": "gambling" + } + }, + "device": { + "dnt": 0, + "devicetype": 4, + "h": 980, + "w": 350, + "connectiontype": 2, + "ua": "Mozilla/5.0 (Linux; Android 10; YAL-L21 Build/HUAWEIYAL-L21; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.131 Mobile Safari/537.36", + "ip": "95.104.196.182", + "make": "Huawei", + "model": "YAL-L21", + "os": "Android", + "osv": "10.0", + "ifa": "6cecfc3c-de97-4861-ba6c-41a9dc94b391", + "geo": { + "country": "RUS" + } + }, + "user": { + "id": "6cecfc3c-de97-4861-ba6c-41a9dc94b391" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 204, + "body": {} + } + } + ], + "expectedBidResponses": [], + "expectedMakeBidsErrors": [] +} \ No newline at end of file diff --git a/adapters/zentotem/zentotemtest/supplemental/video-invalid-mimes-204.json b/adapters/zentotem/zentotemtest/supplemental/video-invalid-mimes-204.json new file mode 100644 index 00000000000..fd96f2c67b0 --- /dev/null +++ b/adapters/zentotem/zentotemtest/supplemental/video-invalid-mimes-204.json @@ -0,0 +1,152 @@ +{ + "mockBidRequest": { + "id": "058e84c8-3684-4725-be57-6a211fb8abc3", + "at": 2, + "bcat": [ "IAB8-18", "IAB8-5", "IAB9-9" ], + "cur": [ + "RUB" + ], + "tmax": 250, + "imp": [ + { + "id": "test-imp-id", + "video": { + "mimes": [ + "image/jpeg" + ], + "protocols": [ + 2, + 3 + ], + "w": 640, + "h": 360, + "linearity": 1, + "skip": 1, + "sequence": 1, + "boxingallowed": 1, + "placement": 1 + }, + "tagid": "27208-0", + "bidfloor": 0.35, + "secure": 1 + } + ], + "app": { + "privacypolicy": 1, + "paid": 0, + "id": "1757830", + "name": "some-app-name", + "bundle": "some-app-bundle", + "storeurl": "some-store-url", + "cat": [ + + "IAB1-1" + ], + "publisher": { + "id": "gambling" + } + }, + "device": { + "dnt": 0, + "devicetype": 4, + "h": 980, + "w": 350, + "connectiontype": 2, + "ua": "Mozilla/5.0 (Linux; Android 10; YAL-L21 Build/HUAWEIYAL-L21; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.131 Mobile Safari/537.36", + "ip": "95.104.196.182", + "make": "Huawei", + "model": "YAL-L21", + "os": "Android", + "osv": "10.0", + "ifa": "6cecfc3c-de97-4861-ba6c-41a9dc94b391", + "geo": { + "country": "RUS" + } + }, + "user": { + "id": "6cecfc3c-de97-4861-ba6c-41a9dc94b391" + } + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://rtb.zentotem.net/bid?sspuid=cqlnvfk00bhs0b6rci6g", + "body": { + "id": "058e84c8-3684-4725-be57-6a211fb8abc3", + "at": 2, + "bcat": [ "IAB8-18", "IAB8-5", "IAB9-9" ], + "cur": [ + "RUB" + ], + "tmax": 250, + "imp": [ + { + "id": "test-imp-id", + "video": { + "mimes": [ + "image/jpeg" + ], + "protocols": [ + 2, + 3 + ], + "w": 640, + "h": 360, + "linearity": 1, + "skip": 1, + "sequence": 1, + "boxingallowed": 1, + "placement": 1 + }, + "tagid": "27208-0", + "bidfloor": 0.35, + "secure": 1 + } + ], + "app": { + "privacypolicy": 1, + "paid": 0, + "id": "1757830", + "name": "some-app-name", + "bundle": "some-app-bundle", + "storeurl": "some-store-url", + "cat": [ + + "IAB1-1" + ], + "publisher": { + "id": "gambling" + } + }, + "device": { + "dnt": 0, + "devicetype": 4, + "h": 980, + "w": 350, + "connectiontype": 2, + "ua": "Mozilla/5.0 (Linux; Android 10; YAL-L21 Build/HUAWEIYAL-L21; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.131 Mobile Safari/537.36", + "ip": "95.104.196.182", + "make": "Huawei", + "model": "YAL-L21", + "os": "Android", + "osv": "10.0", + "ifa": "6cecfc3c-de97-4861-ba6c-41a9dc94b391", + "geo": { + "country": "RUS" + } + }, + "user": { + "id": "6cecfc3c-de97-4861-ba6c-41a9dc94b391" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 204, + "body": {} + } + } + ], + "expectedBidResponses": [], + "expectedMakeBidsErrors": [] +} \ No newline at end of file diff --git a/adapters/zentotem/zentotemtest/supplemental/video-without-mimes-204.json b/adapters/zentotem/zentotemtest/supplemental/video-without-mimes-204.json new file mode 100644 index 00000000000..32bcfd3858a --- /dev/null +++ b/adapters/zentotem/zentotemtest/supplemental/video-without-mimes-204.json @@ -0,0 +1,150 @@ +{ + "mockBidRequest": { + "id": "058e84c8-3684-4725-be57-6a211fb8abc3", + "at": 2, + "bcat": [ "IAB8-18", "IAB8-5", "IAB9-9" ], + "cur": [ + "RUB" + ], + "tmax": 250, + "imp": [ + { + "id": "test-imp-id", + "video": { + "mimes": [ + ], + "protocols": [ + 2, + 3 + ], + "w": 640, + "h": 360, + "linearity": 1, + "skip": 1, + "sequence": 1, + "boxingallowed": 1, + "placement": 1 + }, + "tagid": "27208-0", + "bidfloor": 0.35, + "secure": 1 + } + ], + "app": { + "privacypolicy": 1, + "paid": 0, + "id": "1757830", + "name": "some-app-name", + "bundle": "some-app-bundle", + "storeurl": "some-store-url", + "cat": [ + + "IAB1-1" + ], + "publisher": { + "id": "gambling" + } + }, + "device": { + "dnt": 0, + "devicetype": 4, + "h": 980, + "w": 350, + "connectiontype": 2, + "ua": "Mozilla/5.0 (Linux; Android 10; YAL-L21 Build/HUAWEIYAL-L21; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.131 Mobile Safari/537.36", + "ip": "95.104.196.182", + "make": "Huawei", + "model": "YAL-L21", + "os": "Android", + "osv": "10.0", + "ifa": "6cecfc3c-de97-4861-ba6c-41a9dc94b391", + "geo": { + "country": "RUS" + } + }, + "user": { + "id": "6cecfc3c-de97-4861-ba6c-41a9dc94b391" + } + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://rtb.zentotem.net/bid?sspuid=cqlnvfk00bhs0b6rci6g", + "body": { + "id": "058e84c8-3684-4725-be57-6a211fb8abc3", + "at": 2, + "bcat": [ "IAB8-18", "IAB8-5", "IAB9-9" ], + "cur": [ + "RUB" + ], + "tmax": 250, + "imp": [ + { + "id": "test-imp-id", + "video": { + "mimes": [ + ], + "protocols": [ + 2, + 3 + ], + "w": 640, + "h": 360, + "linearity": 1, + "skip": 1, + "sequence": 1, + "boxingallowed": 1, + "placement": 1 + }, + "tagid": "27208-0", + "bidfloor": 0.35, + "secure": 1 + } + ], + "app": { + "privacypolicy": 1, + "paid": 0, + "id": "1757830", + "name": "some-app-name", + "bundle": "some-app-bundle", + "storeurl": "some-store-url", + "cat": [ + + "IAB1-1" + ], + "publisher": { + "id": "gambling" + } + }, + "device": { + "dnt": 0, + "devicetype": 4, + "h": 980, + "w": 350, + "connectiontype": 2, + "ua": "Mozilla/5.0 (Linux; Android 10; YAL-L21 Build/HUAWEIYAL-L21; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.131 Mobile Safari/537.36", + "ip": "95.104.196.182", + "make": "Huawei", + "model": "YAL-L21", + "os": "Android", + "osv": "10.0", + "ifa": "6cecfc3c-de97-4861-ba6c-41a9dc94b391", + "geo": { + "country": "RUS" + } + }, + "user": { + "id": "6cecfc3c-de97-4861-ba6c-41a9dc94b391" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 204, + "body": {} + } + } + ], + "expectedBidResponses": [], + "expectedMakeBidsErrors": [] +} \ No newline at end of file diff --git a/exchange/adapter_builders.go b/exchange/adapter_builders.go index 97a03dde2a5..40135393952 100755 --- a/exchange/adapter_builders.go +++ b/exchange/adapter_builders.go @@ -221,6 +221,7 @@ import ( "github.com/prebid/prebid-server/v3/adapters/yieldlab" "github.com/prebid/prebid-server/v3/adapters/yieldmo" "github.com/prebid/prebid-server/v3/adapters/yieldone" + "github.com/prebid/prebid-server/v3/adapters/zentotem" "github.com/prebid/prebid-server/v3/adapters/zeroclickfraud" "github.com/prebid/prebid-server/v3/adapters/zeta_global_ssp" "github.com/prebid/prebid-server/v3/adapters/zmaticoo" @@ -453,6 +454,7 @@ func newAdapterBuilders() map[openrtb_ext.BidderName]adapters.Builder { openrtb_ext.BidderYieldlab: yieldlab.Builder, openrtb_ext.BidderYieldmo: yieldmo.Builder, openrtb_ext.BidderYieldone: yieldone.Builder, + openrtb_ext.BidderZentotem: zentotem.Builder, openrtb_ext.BidderZeroClickFraud: zeroclickfraud.Builder, openrtb_ext.BidderZetaGlobalSsp: zeta_global_ssp.Builder, openrtb_ext.BidderZmaticoo: zmaticoo.Builder, diff --git a/go.mod b/go.mod index e844fe5bf25..fe1597fc579 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,7 @@ go 1.21 retract v3.0.0 // Forgot to update major version in import path and module name require ( + github.com/51Degrees/device-detection-go/v4 v4.4.35 github.com/DATA-DOG/go-sqlmock v1.5.0 github.com/IABTechLab/adscert v0.34.0 github.com/NYTimes/gziphandler v1.1.1 @@ -32,8 +33,11 @@ require ( github.com/prometheus/client_model v0.2.0 github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 github.com/rs/cors v1.11.0 + github.com/spf13/cast v1.5.0 github.com/spf13/viper v1.12.0 github.com/stretchr/testify v1.8.1 + github.com/tidwall/gjson v1.17.1 + github.com/tidwall/sjson v1.2.5 github.com/vrischmann/go-metrics-influxdb v0.1.1 github.com/xeipuuv/gojsonschema v1.2.0 github.com/yudai/gojsondiff v1.0.0 @@ -45,7 +49,6 @@ require ( ) require ( - github.com/51Degrees/device-detection-go/v4 v4.4.35 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect @@ -65,15 +68,12 @@ require ( github.com/prometheus/procfs v0.7.3 // indirect github.com/sergi/go-diff v1.2.0 // indirect github.com/spf13/afero v1.8.2 // indirect - github.com/spf13/cast v1.5.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/objx v0.5.0 // indirect github.com/subosito/gotenv v1.3.0 // indirect - github.com/tidwall/gjson v1.17.1 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect - github.com/tidwall/sjson v1.2.5 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect diff --git a/openrtb_ext/bidders.go b/openrtb_ext/bidders.go index 9e86ad86ec1..fd22900f733 100644 --- a/openrtb_ext/bidders.go +++ b/openrtb_ext/bidders.go @@ -239,6 +239,7 @@ var coreBidderNames []BidderName = []BidderName{ BidderYieldlab, BidderYieldmo, BidderYieldone, + BidderZentotem, BidderZeroClickFraud, BidderZetaGlobalSsp, BidderZmaticoo, @@ -569,6 +570,7 @@ const ( BidderYieldlab BidderName = "yieldlab" BidderYieldmo BidderName = "yieldmo" BidderYieldone BidderName = "yieldone" + BidderZentotem BidderName = "zentotem" BidderZeroClickFraud BidderName = "zeroclickfraud" BidderZetaGlobalSsp BidderName = "zeta_global_ssp" BidderZmaticoo BidderName = "zmaticoo" diff --git a/static/bidder-info/zentotem.yaml b/static/bidder-info/zentotem.yaml new file mode 100644 index 00000000000..a5d30c1ac6f --- /dev/null +++ b/static/bidder-info/zentotem.yaml @@ -0,0 +1,16 @@ +endpoint: "https://rtb.zentotem.net/bid?sspuid=cqlnvfk00bhs0b6rci6g" +maintainer: + email: support@zentotem.net +endpointCompression: gzip +modifyingVastXmlAllowed: true +capabilities: + app: + mediaTypes: + - banner + - video + - native + site: + mediaTypes: + - banner + - video + - native diff --git a/static/bidder-params/zentotem.json b/static/bidder-params/zentotem.json new file mode 100644 index 00000000000..de59fc47b70 --- /dev/null +++ b/static/bidder-params/zentotem.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Zentotem Adapter Params", + "description": "A schema which validates params accepted by the Zentotem adapter", + "type": "object", + "properties": {} +}