use of org.prebid.mobile.rendering.models.openrtb.bidRequests.source.Source in project prebid-mobile-android by prebid.
the class BasicParameterBuilderTest method getExpectedBidRequest.
private BidRequest getExpectedBidRequest(AdConfiguration adConfiguration, String uuid) {
BidRequest bidRequest = new BidRequest();
bidRequest.setId(uuid);
boolean isVideo = adConfiguration.isAdType(AdConfiguration.AdUnitIdentifierType.VAST);
bidRequest.getExt().put("prebid", Prebid.getJsonObjectForBidRequest(PrebidRenderingSettings.getAccountId(), isVideo));
// if coppaEnabled - set 1, else No coppa is sent
if (PrebidRenderingSettings.isCoppaEnabled) {
bidRequest.getRegs().coppa = 1;
}
Imp imp = getExpectedImp(adConfiguration, uuid);
bidRequest.getImp().add(imp);
Source source = bidRequest.getSource();
source.setTid(uuid);
source.getExt().put(KEY_OM_PARTNER_NAME, OmAdSessionManager.PARTNER_NAME);
source.getExt().put(KEY_OM_PARTNER_VERSION, OmAdSessionManager.PARTNER_VERSION);
bidRequest.getUser();
return bidRequest;
}
Aggregations