From e2eb95000339618bdc3e833fa1ee33adb129be95 Mon Sep 17 00:00:00 2001 From: Elber Carneiro <81249884+ym-elber@users.noreply.github.com> Date: Tue, 8 Mar 2022 07:06:49 -0500 Subject: [PATCH] Video and banner deal id (#8135) --- modules/yieldmoBidAdapter.js | 2 ++ test/spec/modules/yieldmoBidAdapter_spec.js | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/modules/yieldmoBidAdapter.js b/modules/yieldmoBidAdapter.js index fc370f673d0..bc29f4822c8 100644 --- a/modules/yieldmoBidAdapter.js +++ b/modules/yieldmoBidAdapter.js @@ -232,6 +232,7 @@ function addPlacement(request) { */ function createNewBannerBid(response) { return { + dealId: response.publisherDealId, requestId: response['callback_id'], cpm: response.cpm, width: response.width, @@ -257,6 +258,7 @@ function createNewVideoBid(response, bidRequest) { const imp = find((deepAccess(bidRequest, 'data.imp') || []), imp => imp.id === response.impid); let result = { + dealId: response.dealid, requestId: imp.id, cpm: response.price, width: imp.video.w, diff --git a/test/spec/modules/yieldmoBidAdapter_spec.js b/test/spec/modules/yieldmoBidAdapter_spec.js index 3eee9e44453..f72705a79ac 100644 --- a/test/spec/modules/yieldmoBidAdapter_spec.js +++ b/test/spec/modules/yieldmoBidAdapter_spec.js @@ -511,6 +511,7 @@ describe('YieldmoAdapter', function () { body: [{ callback_id: '21989fdbef550a', cpm: 3.45455, + publisherDealId: 'YMO_123', width: 300, height: 250, ad: '' + @@ -525,6 +526,7 @@ describe('YieldmoAdapter', function () { const newResponse = spec.interpretResponse(mockServerResponse()); expect(newResponse.length).to.be.equal(1); expect(newResponse[0]).to.deep.equal({ + dealId: 'YMO_123', requestId: '21989fdbef550a', cpm: 3.45455, width: 300, @@ -552,6 +554,7 @@ describe('YieldmoAdapter', function () { crid: 'dd65c0a7536aff', impid: '91ea8bba1', price: 1.5, + dealid: 'YMO_456' }, }, ]; @@ -574,6 +577,7 @@ describe('YieldmoAdapter', function () { const newResponse = spec.interpretResponse(response, bidRequest); expect(newResponse.length).to.be.equal(2); expect(newResponse[1]).to.deep.equal({ + dealId: 'YMO_456', cpm: 1.5, creativeId: 'dd65c0a7536aff', currency: 'USD',