Skip to content

Commit

Permalink
Changed name to bidType.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikael-lundin committed Sep 28, 2023
1 parent e847ee1 commit 429a99c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions adapters/adnuntius/adnuntius.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,11 +367,11 @@ func generateAdResponse(ad Ad, imp openrtb2.Imp, html string, request *openrtb2.
}}
}

if adnuntiusExt.PriceType != "" {
if strings.EqualFold(string(adnuntiusExt.PriceType), "net") {
if adnuntiusExt.BidType != "" {
if strings.EqualFold(string(adnuntiusExt.BidType), "net") {
price = ad.NetBid.Amount
}
if strings.EqualFold(string(adnuntiusExt.PriceType), "gross") {
if strings.EqualFold(string(adnuntiusExt.BidType), "gross") {
price = ad.GrossBid.Amount
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"ext": {
"bidder": {
"auId": "123",
"priceType": "gross"
"bidType": "gross"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"ext": {
"bidder": {
"auId": "123",
"priceType": "net"
"bidType": "net"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"ext": {
"bidder": {
"auId": "123",
"priceType": 123
"bidType": 123
}
}
}
Expand All @@ -31,7 +31,7 @@
"httpCalls": [],
"expectedMakeRequestsErrors": [
{
"value": "Error unmarshalling ExtImpValues: json: cannot unmarshal number into Go struct field ImpExtAdnunitus.priceType of type string",
"value": "Error unmarshalling ExtImpValues: json: cannot unmarshal number into Go struct field ImpExtAdnunitus.bidType of type string",
"comparison": "literal"
}
]
Expand Down
2 changes: 1 addition & 1 deletion openrtb_ext/imp_adnuntius.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ type ImpExtAdnunitus struct {
Network string `json:"network"`
NoCookies bool `json:"noCookies"`
MaxDeals int `json:"maxDeals"`
PriceType string `json:"priceType,omitempty"`
BidType string `json:"bidType,omitempty"`
}

0 comments on commit 429a99c

Please sign in to comment.