Skip to content

Commit

Permalink
GumGum: Override the default currency (#3928)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinGumGum authored Nov 4, 2024
1 parent 6e150f3 commit a788661
Show file tree
Hide file tree
Showing 2 changed files with 114 additions and 1 deletion.
4 changes: 3 additions & 1 deletion adapters/gumgum/gumgum.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ func (g *adapter) MakeBids(internalRequest *openrtb2.BidRequest, externalRequest
})
}
}

if bidResp.Cur != "" {
bidResponse.Currency = bidResp.Cur
}
return bidResponse, errs
}

Expand Down
111 changes: 111 additions & 0 deletions adapters/gumgum/gumgumtest/supplemental/convert-currency.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
]
}

0 comments on commit a788661

Please sign in to comment.