Search in sources :

Example 1 with Source

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;
}
Also used : Imp(org.prebid.mobile.rendering.models.openrtb.bidRequests.Imp) Source(org.prebid.mobile.rendering.models.openrtb.bidRequests.source.Source) BidRequest(org.prebid.mobile.rendering.models.openrtb.BidRequest)

Aggregations

BidRequest (org.prebid.mobile.rendering.models.openrtb.BidRequest)1 Imp (org.prebid.mobile.rendering.models.openrtb.bidRequests.Imp)1 Source (org.prebid.mobile.rendering.models.openrtb.bidRequests.source.Source)1