Class POBAdResponse.Builder
-
- All Implemented Interfaces:
public class POBAdResponse.Builder<T extends POBAdDescriptor>Builder definition to build POBAdResponse class
-
-
Constructor Summary
Constructors Constructor Description POBAdResponse.Builder(List<T> bids)Constructor with the list of all bids POBAdResponse.Builder(POBAdResponse<T> adResponse)Constructor with the ad response POBAdResponse.Builder(JSONObject customData)Constructor with the JSON object
-
Method Summary
Modifier and Type Method Description POBAdResponse.Builder<T>updateWinningBid(@NonNull() T winningBid)Update the winning bid in the adResponse builder, This will update all respective bids to make winning bid consistent across adResponse like bids, serverSidePartnerBids POBAdResponse.Builder<T>updateWithRefreshIntervalAndExpiryTimeout(@NonNull() String placementType)Update ad response bids (bids, serverSidePartnerBids) with refresh interval and expiry timeout. POBAdResponse.Builder<T>setSendAllBidsState(boolean state)Sets the state of the SendAllBids flag POBAdResponse<T>build()Builds the instance of the POBAdResponse based on provided details. POBAdResponse.Builder<T>setServerSidePartnerBids(List<T> serverSidePartnerBids)Update the server-side Partner bids in the adResponse builder POBAdResponse.Builder<T>setWinningBid(@Nullable() T winningBid)Sets the winning bid POBAdResponse.Builder<T>setNextHighestDynamicBid(@Nullable() T nextHighestDynamicBid)POBAdResponse.Builder<T>setRefreshInterval(int refreshInterval)Sets the refresh interval POBAdResponse.Builder<T>setNbrCode(@Nullable() Integer nbrCode)Sets the nbr code -
-
Constructor Detail
-
POBAdResponse.Builder
POBAdResponse.Builder(List<T> bids)
Constructor with the list of all bids- Parameters:
bids- List of bids
-
POBAdResponse.Builder
POBAdResponse.Builder(POBAdResponse<T> adResponse)
Constructor with the ad response- Parameters:
adResponse- ad response object
-
POBAdResponse.Builder
POBAdResponse.Builder(JSONObject customData)
Constructor with the JSON object- Parameters:
customData- JSON object of an Ad response
-
-
Method Detail
-
updateWinningBid
POBAdResponse.Builder<T> updateWinningBid(@NonNull() T winningBid)
Update the winning bid in the adResponse builder, This will update all respective bids to make winning bid consistent across adResponse like bids, serverSidePartnerBids
- Parameters:
winningBid- bid instance to be update- Returns:
Returns updated instance
-
updateWithRefreshIntervalAndExpiryTimeout
POBAdResponse.Builder<T> updateWithRefreshIntervalAndExpiryTimeout(@NonNull() String placementType)
Update ad response bids (bids, serverSidePartnerBids) with refresh interval and expiry timeout. While updating expiryTimeout isInterstitial flag is used i.e if it's true, the timeout will be BID_EXPIRE_TIME_IN_MILLIS set, else it's considered as an Banner type and expiry timeout is set based on whether banner is of video if it's video the timeout will be BID_EXPIRE_TIME_IN_MILLIS set else the timeout will be BANNER_BID_EXPIRE_TIME_IN_MILLIS set
- Parameters:
placementType- used to set expiryTimeout- Returns:
updated adResponse builder.
-
setSendAllBidsState
POBAdResponse.Builder<T> setSendAllBidsState(boolean state)
Sets the state of the SendAllBids flag
- Parameters:
state- true if the send all bid state is enabled else false- Returns:
Returns updated instance
-
build
@NonNull() POBAdResponse<T> build()
Builds the instance of the POBAdResponse based on provided details.
- Returns:
Returns updated instance
-
setServerSidePartnerBids
POBAdResponse.Builder<T> setServerSidePartnerBids(List<T> serverSidePartnerBids)
Update the server-side Partner bids in the adResponse builder
- Parameters:
serverSidePartnerBids- server-side Partner bids to be update- Returns:
Returns updated instance
-
setWinningBid
POBAdResponse.Builder<T> setWinningBid(@Nullable() T winningBid)
Sets the winning bid
- Parameters:
winningBid- winning bid instance- Returns:
Returns updated instance
-
setNextHighestDynamicBid
@NonNull() POBAdResponse.Builder<T> setNextHighestDynamicBid(@Nullable() T nextHighestDynamicBid)
-
setRefreshInterval
POBAdResponse.Builder<T> setRefreshInterval(int refreshInterval)
Sets the refresh interval
- Parameters:
refreshInterval- refresh interval- Returns:
Returns updated instance
-
setNbrCode
POBAdResponse.Builder<T> setNbrCode(@Nullable() Integer nbrCode)
Sets the nbr code
- Parameters:
nbrCode- Code received in the ad response- Returns:
Returns updated instance
-
-
-
-