diff --git a/adapters/gumgum/gumgum.go b/adapters/gumgum/gumgum.go index f6ab415516c..68ca84c7ce1 100644 --- a/adapters/gumgum/gumgum.go +++ b/adapters/gumgum/gumgum.go @@ -122,7 +122,9 @@ func (g *adapter) MakeBids(internalRequest *openrtb2.BidRequest, externalRequest }) } } - + if bidResp.Cur != "" { + bidResponse.Currency = bidResp.Cur + } return bidResponse, errs } diff --git a/adapters/gumgum/gumgumtest/supplemental/convert-currency.json b/adapters/gumgum/gumgumtest/supplemental/convert-currency.json new file mode 100644 index 00000000000..6c5be286275 --- /dev/null +++ b/adapters/gumgum/gumgumtest/supplemental/convert-currency.json @@ -0,0 +1,111 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + }, + { + "w": 300, + "h": 300 + } + ], + "w": 300, + "h": 250 + }, + "ext": { + "bidder": { + "pubId": 12345678 + } + } + } + ], + "site": { + "publisher": { + "id": "12345678" + } + } + }, + + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://g2.gumgum.com/providers/prbds2s/bid", + "body":{ + "id": "test-request-id", + "imp": [{ + "id": "test-imp-id", + "banner": { + "format": [{ + "w": 300, + "h": 250 + }, { + "w": 300, + "h": 300 + }], + "w": 300, + "h": 250 + }, + "ext": { + "bidder": { + "pubId": 12345678 + } + } + }], + "site": { + "publisher": { + "id": "12345678" + } + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "cur": "EUR", + "seatbid": [ + { + "bid": [ + { + "crid": "2068416", + "adm": "some-test-ad", + "adid": "2068416", + "price": 5, + "id": "5736a50b-6b05-42a8-aa6d-b0a4649dcd05", + "impid": "test-imp-id", + "cid": "4747" + } + ] + } + ] + } + } + } + ], + + "expectedBidResponses": [ + { + "currency": "EUR", + "bids": [ + { + "bid": { + "crid": "2068416", + "adm": "some-test-ad", + "adid": "2068416", + "price": 5, + "id": "5736a50b-6b05-42a8-aa6d-b0a4649dcd05", + "impid": "test-imp-id", + "cid": "4747" + }, + "type": "banner" + } + ] + } + ] +}