diff --git a/modules/ablidaBidAdapter.js b/modules/ablidaBidAdapter.js
index 470a845cd20..af9c206700f 100644
--- a/modules/ablidaBidAdapter.js
+++ b/modules/ablidaBidAdapter.js
@@ -46,8 +46,9 @@ export const spec = {
referer: bidderRequest.refererInfo.referer,
jaySupported: jaySupported,
device: device,
- adapterVersion: 3,
- mediaTypes: bidRequest.mediaTypes
+ adapterVersion: 4,
+ mediaTypes: bidRequest.mediaTypes,
+ gdprConsent: bidderRequest.gdprConsent
};
return {
method: 'POST',
diff --git a/test/spec/modules/ablidaBidAdapter_spec.js b/test/spec/modules/ablidaBidAdapter_spec.js
index e32531b1eac..0743bf0a896 100644
--- a/test/spec/modules/ablidaBidAdapter_spec.js
+++ b/test/spec/modules/ablidaBidAdapter_spec.js
@@ -9,17 +9,23 @@ describe('ablidaBidAdapter', function () {
const adapter = newBidder(spec);
describe('isBidRequestValid', function () {
let bid = {
+ adUnitCode: 'adunit-code',
+ auctionId: '69e8fef8-5105-4a99-b011-d5669f3bc7f0',
+ bidRequestsCount: 1,
bidder: 'ablida',
+ bidderRequestId: '14d2939272a26a',
+ bidderRequestsCount: 1,
+ bidderWinsCount: 0,
+ bidId: '1234asdf1234',
+ mediaTypes: {banner: {sizes: [[300, 250]]}},
params: {
placementId: 123
},
- adUnitCode: 'adunit-code',
sizes: [
[300, 250]
],
- bidId: '1234asdf1234',
- bidderRequestId: '1234asdf1234asdf',
- auctionId: '69e8fef8-5105-4a99-b011-d5669f3bc7f0'
+ src: 'client',
+ transactionId: '4781e6ac-93c4-42ba-86fe-ab5f278863cf'
};
it('should return true where required params found', function () {
expect(spec.isBidRequestValid(bid)).to.equal(true);
@@ -28,22 +34,29 @@ describe('ablidaBidAdapter', function () {
describe('buildRequests', function () {
let bidRequests = [
{
+ adUnitCode: 'adunit-code',
+ auctionId: '69e8fef8-5105-4a99-b011-d5669f3bc7f0',
+ bidId: '23beaa6af6cdde',
+ bidRequestsCount: 1,
bidder: 'ablida',
+ bidderRequestId: '14d2939272a26a',
+ bidderRequestsCount: 1,
+ bidderWinsCount: 0,
+ mediaTypes: {banner: {sizes: [[300, 250]]}},
params: {
placementId: 123
},
sizes: [
[300, 250]
],
- adUnitCode: 'adunit-code',
- bidId: '23beaa6af6cdde',
- bidderRequestId: '14d2939272a26a',
- auctionId: '69e8fef8-5105-4a99-b011-d5669f3bc7f0',
+ src: 'client',
+ transactionId: '4781e6ac-93c4-42ba-86fe-ab5f278863cf'
}
];
let bidderRequests = {
refererInfo: {
+ canonicalUrl: '',
numIframes: 0,
reachedTop: true,
referer: 'http://example.com',
@@ -62,42 +75,53 @@ describe('ablidaBidAdapter', function () {
method: 'POST',
url: ENDPOINT_URL,
data: {
+ adapterVersion: 4,
+ bidId: '2b8c4de0116e54',
+ categories: undefined,
+ device: 'desktop',
+ gdprConsent: undefined,
+ jaySupported: true,
+ mediaTypes: {banner: {sizes: [[300, 250]]}},
placementId: 'testPlacementId',
width: 300,
height: 200,
- bidId: '2b8c4de0116e54',
- jaySupported: true,
- device: 'desktop',
- referer: 'www.example.com',
- adapterVersion: 2
+ referer: 'www.example.com'
}
};
let serverResponse = {
body: [{
- requestId: '2b8c4de0116e54',
+ ad: '',
cpm: 1.00,
- width: 300,
- height: 250,
creativeId: '2b8c4de0116e54',
currency: 'EUR',
+ height: 250,
+ mediaType: 'banner',
+ meta: {},
netRevenue: true,
+ nurl: 'https://example.com/some-tracker',
+ originalCpm: '0.10',
+ originalCurrency: 'EUR',
+ requestId: '2b8c4de0116e54',
ttl: 3000,
- ad: '',
- nurl: 'https://example.com/some-tracker'
+ width: 300
}]
};
it('should get the correct bid response', function () {
let expectedResponse = [{
- requestId: '2b8c4de0116e54',
+ ad: '',
cpm: 1.00,
- width: 300,
- height: 250,
creativeId: '2b8c4de0116e54',
currency: 'EUR',
+ height: 250,
+ mediaType: 'banner',
+ meta: {},
netRevenue: true,
+ nurl: 'https://example.com/some-tracker',
+ originalCpm: '0.10',
+ originalCurrency: 'EUR',
+ requestId: '2b8c4de0116e54',
ttl: 3000,
- ad: '',
- nurl: 'https://example.com/some-tracker'
+ width: 300
}];
let result = spec.interpretResponse(serverResponse, bidRequest[0]);
expect(Object.keys(result)).to.deep.equal(Object.keys(expectedResponse));