Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inmar bidder adapter: Make adNetId an optional paramater #6136

Merged
merged 14 commits into from
Dec 18, 2020
Merged
5 changes: 1 addition & 4 deletions modules/inmarBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const spec = {
* @returns {boolean} True if this is a valid bid, and false otherwise
*/
isBidRequestValid: function(bid) {
return !!(bid.params && bid.params.partnerId && bid.params.adnetId);
return !!(bid.params && bid.params.partnerId);
},

/**
Expand Down Expand Up @@ -49,9 +49,6 @@ export const spec = {
return {
method: 'POST',
url: 'https://prebid.owneriq.net:8443/bidder/pb/bid',
options: {
withCredentials: false
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't you need this set to true to get your cookies?

},
data: payloadString,
};
},
Expand Down
2 changes: 0 additions & 2 deletions modules/inmarBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ Please reach out to your account manager for more information.
bidder: 'inmar',
params: {
partnerId: 12345,
adnetId: 'ADb1f40rmi',
position: 1
}
}]
Expand All @@ -37,7 +36,6 @@ Please reach out to your account manager for more information.
bidder: 'inmar',
params: {
partnerId: 12345,
adnetId: 'ADb1f40rmo',
position: 0
}
}]
Expand Down
11 changes: 0 additions & 11 deletions test/spec/modules/inmarBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ describe('Inmar adapter tests', function () {
},
bidder: 'inmar',
params: {
adnetId: 'ADb1f40rmi',
partnerId: 12345
},
auctionId: '0cb3144c-d084-4686-b0d6-f5dbe917c563',
Expand All @@ -39,7 +38,6 @@ describe('Inmar adapter tests', function () {
},
bidder: 'inmar',
params: {
adnetId: 'ADb1f40rmi',
partnerId: 12345
},
auctionId: '0cb3144c-d084-4686-b0d6-f5dbe917c563',
Expand All @@ -60,7 +58,6 @@ describe('Inmar adapter tests', function () {
],
bidder: 'inmar',
params: {
adnetId: 'ADb1f40rmi',
partnerId: 12345,
},
auctionId: '851adee7-d843-48f9-a7e9-9ff00573fcbf',
Expand Down Expand Up @@ -118,7 +115,6 @@ describe('Inmar adapter tests', function () {

expect(request).to.have.property('method').and.to.equal('POST');
const requestContent = JSON.parse(request.data);
expect(requestContent.bidRequests[0].params).to.have.property('adnetId').and.to.equal('ADb1f40rmi');
expect(requestContent.bidRequests[0].params).to.have.property('partnerId').and.to.equal(12345);
expect(requestContent.bidRequests[0]).to.have.property('auctionId').and.to.equal('0cb3144c-d084-4686-b0d6-f5dbe917c563');
expect(requestContent.bidRequests[0]).to.have.property('bidId').and.to.equal('2c7c8e9c900244');
Expand Down Expand Up @@ -198,19 +194,12 @@ describe('Inmar adapter tests', function () {
})).to.equal(false);
expect(spec.isBidRequestValid({
params: {
adnetId: 'ADb1f40rmi'
}
})).to.equal(false);
expect(spec.isBidRequestValid({
params: {
partnerId: 12345
}
})).to.equal(false);
expect(spec.isBidRequestValid({
params: {
adnetId: 'ADb1f40rmi',
partnerId: 12345
}
})).to.equal(true);
});

Expand Down