From a788661f45ac5399cc33f656cfca7a3f1ee8d107 Mon Sep 17 00:00:00 2001 From: MartinGumGum <109325501+MartinGumGum@users.noreply.github.com> Date: Mon, 4 Nov 2024 11:14:07 -0800 Subject: [PATCH] GumGum: Override the default currency (#3928) --- adapters/gumgum/gumgum.go | 4 +- .../supplemental/convert-currency.json | 111 ++++++++++++++++++ 2 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 adapters/gumgum/gumgumtest/supplemental/convert-currency.json 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" + } + ] + } + ] +}