Class POBBid
-
- All Implemented Interfaces:
-
com.pubmatic.sdk.common.base.POBAdDescriptor
public class POBBid implements POBAdDescriptorHolds information of winning bid along with all the bids that participated in the auction.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classPOBBid.BuilderBuilder class to build POBBid, this is an extensible approach can be used for enhancement This helps to make POBBid immutable
-
Field Summary
Fields Modifier and Type Field Description public StringimpressionIdpublic doublepricepublic intstatuspublic intrefreshIntervalpublic StringpartnerNamepublic StringpartnerIdpublic StringcreativeIdpublic Stringcreativepublic StringdealIdpublic intwidthpublic intheightpublic JSONObjectrawBidpublic StringdisplayedOnBehalfOfpublic StringpaidBypublic List<POBDSATransparencyInfo>transparencyDatapublic booleanisVideopublic StringbidTypepublic POBImpressionCountingMethodimpressionCountingMethodpublic Stringbundlepublic List<String>clickTrackerspublic final static intBID_STATUS_OKpublic final static intBID_STATUS_NOT_OKpublic final static StringSTATIC_PRICE_BIDpublic final static StringDYNAMIC_PRICE_BIDpublic final static StringCREATIVE_TYPE_BANNERpublic final static StringCREATIVE_TYPE_VIDEOpublic final static StringCREATIVE_TYPE_NATIVE
-
Method Summary
Modifier and Type Method Description StringgetImpressionId()Returns an Impression Id. doublegetPrice()Returns Net Price/bid value This method is updated to return net price from OW SDK v2.4.0. intgetStatus()Returns Bid status intgetRefreshInterval()Returns the refresh interval received in ad response StringgetPartnerName()Returns the name of the winning partner StringgetPartnerId()Returns the OpenWrap partner Id of this bid StringgetCreativeId()Returns the creative Id StringgetCreative()Returns ad creative StringgetDealId()Returns deal Id. intgetWidth()Returns Width of bid creative intgetHeight()Returns Height of bid creative JSONObjectgetRawBid()StringgetDisplayedOnBehalfOf()StringgetPaidBy()List<POBDSATransparencyInfo>getTransparencyData()booleanisVideo()StringgetBidType()Bid type POBImpressionCountingMethodgetImpressionCountingMethod()Returns the method of impression tracking StringgetBundle()List<String>getClickTrackers()static POBBidcreate(@NonNull() POBBid bid, @Nullable() Map<String, String> targetingInfo)static POBBidbuild(@NonNull() String partnerName, @NonNull() JSONObject bidJsonObject)Initializes and returns POBBid object with given bid details and partner name List<POBReward>getAllRewards()Returns the list of Rewards object (if any) from the rewards array under bid extension. POBRewardgetFirstReward()Returns the first Reward object (if any) from the rewards array under bid extension. booleanisExpired()The bid expires after the below timeouts it was received based on ad format. intgetRemainingExpirationTime()Gives the remaining time for bid expiry. booleanisServerSideAuctionWinner()Return true if server-side auction wins StringgetlURL()Returns Loss notice URL called by the exchange if the bid lose. StringgetnURL()Returns Win notice URL called by the exchange if the bid wins inthashCode()Custom hash code generation by using concatenation of (rawbid + impression + status) booleanisStaticBid()Returns of Bid is of static price booleanequals(@Nullable() Object obj)Deep comparison by using hashcode StringtoString()StringgetRenderableContent()Returns the winning creative to be render booleanisCompanion()intgetContentWidth()intgetContentHeight()StringgetId()Return bid id of the bid StringgetCreativeType()Map<String, String>getTargetingInfo()Returns the map of targeting information, that needs to be passed to ad server SDK. POBAdDescriptorbuildWithRefreshAndExpiryTimeout(int refreshInterval, int expiryTimeout)booleanhasWon()To get winning status with respect to primary ad server. booleanenableDsaInfoIcon()POBCTAOverlayDatagetCTAOverlayData()voidsetHasWon(boolean hasWon)To update winning status with respect to primary ad server, expected to be updated externally. -
Methods inherited from class com.pubmatic.sdk.common.base.POBAdDescriptor
getBundle, getClickTrackers, getDisplayedOnBehalfOf, getImpressionCountingMethod, getPaidBy, getRawBid, getRefreshInterval, getStatus, getTransparencyData, isVideo -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getImpressionId
@Nullable() String getImpressionId()
Returns an Impression Id. Also used as a bid id
- Returns:
Impression Id
-
getPrice
double getPrice()
Returns Net Price/bid value This method is updated to return net price from OW SDK v2.4.0.
- Returns:
Net Ecpm price / bid value
-
getStatus
int getStatus()
Returns Bid status
- Returns:
Returns bid status as BID_STATUS_OK, if ecpm price is greater than 0 else return BID_STATUS_NOT_OK.
-
getRefreshInterval
int getRefreshInterval()
Returns the refresh interval received in ad response
- Returns:
refresh interval
-
getPartnerName
@Nullable() String getPartnerName()
Returns the name of the winning partner
- Returns:
Name of the winning partner
-
getPartnerId
@Nullable() String getPartnerId()
Returns the OpenWrap partner Id of this bid
- Returns:
OpenWrap partner Id of this bid
-
getCreativeId
@Nullable() String getCreativeId()
Returns the creative Id
- Returns:
Creative Id
-
getCreative
@Nullable() String getCreative()
Returns ad creative
- Returns:
Ad creative
-
getWidth
int getWidth()
Returns Width of bid creative
- Returns:
Width of bid creative
-
getHeight
int getHeight()
Returns Height of bid creative
- Returns:
Height of bid creative
-
getRawBid
@Nullable() JSONObject getRawBid()
-
getDisplayedOnBehalfOf
@Nullable() String getDisplayedOnBehalfOf()
-
getTransparencyData
@Nullable() List<POBDSATransparencyInfo> getTransparencyData()
-
isVideo
boolean isVideo()
-
getBidType
@NonNull() String getBidType()
Bid type
- Returns:
bid type
-
getImpressionCountingMethod
@NonNull() POBImpressionCountingMethod getImpressionCountingMethod()
Returns the method of impression tracking
- Returns:
the method of impression tracking
-
getClickTrackers
@Nullable() List<String> getClickTrackers()
-
create
@NonNull() static POBBid create(@NonNull() POBBid bid, @Nullable() Map<String, String> targetingInfo)
-
build
@NonNull() static POBBid build(@NonNull() String partnerName, @NonNull() JSONObject bidJsonObject)
Initializes and returns POBBid object with given bid details and partner name
- Parameters:
partnerName- Name of the partnerbidJsonObject- JSON object for the winning bid- Returns:
Instance of POBBid
-
getAllRewards
@Nullable() List<POBReward> getAllRewards()
Returns the list of Rewards object (if any) from the rewards array under bid extension. It contains the Reward-type and its value. For example: "type": "coins", "value": "50". If no rewards found then it returns null.
- Returns:
the List of Rewards object containing the Reward-type and its value.
-
getFirstReward
@Nullable() POBReward getFirstReward()
Returns the first Reward object (if any) from the rewards array under bid extension. It contains the Reward-type and its value. For example: "type": "coins", "value": "50". If no rewards found then it returns null.
- Returns:
the first Reward object containing the Reward-type and its value.
-
isExpired
boolean isExpired()
The bid expires after the below timeouts it was received based on ad format. Display banner : 5 min Other : 60 min
- Returns:
true if the bid has expired
-
getRemainingExpirationTime
int getRemainingExpirationTime()
Gives the remaining time for bid expiry.
- Returns:
remaining expiry time in milli-seconds
-
isServerSideAuctionWinner
boolean isServerSideAuctionWinner()
Return true if server-side auction wins
- Returns:
true if server-side auction wins
-
getlURL
@Nullable() String getlURL()
Returns Loss notice URL called by the exchange if the bid lose.
- Returns:
loss url
-
getnURL
@Nullable() String getnURL()
Returns Win notice URL called by the exchange if the bid wins
- Returns:
Notice URL
-
hashCode
int hashCode()
Custom hash code generation by using concatenation of (rawbid + impression + status)
- Returns:
hash code specific to bid
-
isStaticBid
boolean isStaticBid()
Returns of Bid is of static price
- Returns:
true bid is of STATIC_PRICE_BID, else returns false
-
equals
boolean equals(@Nullable() Object obj)
Deep comparison by using hashcode
- Parameters:
obj- the obj which is being compared with target bid- Returns:
true if obj is equals with target bid, else returns false
-
getRenderableContent
@Nullable() String getRenderableContent()
Returns the winning creative to be render
-
isCompanion
boolean isCompanion()
-
getContentWidth
int getContentWidth()
-
getContentHeight
int getContentHeight()
-
getCreativeType
@Nullable() String getCreativeType()
-
getTargetingInfo
@Nullable() Map<String, String> getTargetingInfo()
Returns the map of targeting information, that needs to be passed to ad server SDK. If the the bid is not valid bid (check with its status see BID_STATUS_OK) it returns null else return valid bid targeting info map
- Returns:
Map of targeting information
-
buildWithRefreshAndExpiryTimeout
POBAdDescriptor buildWithRefreshAndExpiryTimeout(int refreshInterval, int expiryTimeout)
-
hasWon
boolean hasWon()
To get winning status with respect to primary ad server.
- Returns:
winning status of the bid
-
enableDsaInfoIcon
boolean enableDsaInfoIcon()
-
getCTAOverlayData
@Nullable() POBCTAOverlayData getCTAOverlayData()
-
setHasWon
void setHasWon(boolean hasWon)
To update winning status with respect to primary ad server, expected to be updated externally.
- Parameters:
hasWon- winning status of type boolean
-
-
-
-