Package com.yandex.metrica
Class AdRevenue
java.lang.Object
com.yandex.metrica.AdRevenue
public class AdRevenue
extends java.lang.Object
The class to store Ad Revenue data.
The Ad Revenue object should be passed to the AppMetrica by using the
YandexMetrica.reportAdRevenue(AdRevenue)
or IReporter.reportAdRevenue(AdRevenue)method.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAdRevenue.BuilderBuilder class forAdRevenueobjects. -
Field Summary
Fields Modifier and Type Field Description java.lang.StringadNetworkAd network.java.lang.StringadPlacementIdId of ad placement.java.lang.StringadPlacementNameName of ad placement.java.math.BigDecimaladRevenueAmount of money received via ad revenue.AdTypeadTypeAd type.java.lang.StringadUnitIdId of ad unit.java.lang.StringadUnitNameName of ad unit.java.util.CurrencycurrencyCurrency in which money from `adRevenue` is represented.java.util.Map<java.lang.String,java.lang.String>payloadArbitrary payload: additional info represented as key-value pairs.java.lang.StringprecisionPrecision. -
Method Summary
Modifier and Type Method Description static AdRevenue.BuildernewBuilder(double adRevenue, java.util.Currency currency)Creates the new instance ofAdRevenue.Builder.static AdRevenue.BuildernewBuilder(long adRevenueMicros, java.util.Currency currency)Creates the new instance ofAdRevenue.Builder.static AdRevenue.BuildernewBuilder(java.math.BigDecimal adRevenue, java.util.Currency currency)Creates the new instance ofAdRevenue.Builder.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
adRevenue
@NonNull public final java.math.BigDecimal adRevenueAmount of money received via ad revenue. It cannot be negative. -
currency
@NonNull public final java.util.Currency currencyCurrency in which money from `adRevenue` is represented. -
adType
Ad type. See possible values inAdType. -
adNetwork
@Nullable public final java.lang.String adNetworkAd network. Maximum length is 100 symbols. If the value exceeds this limit it will be truncated by AppMetrica. -
adUnitId
@Nullable public final java.lang.String adUnitIdId of ad unit. Maximum length is 100 symbols. If the value exceeds this limit it will be truncated by AppMetrica. -
adUnitName
@Nullable public final java.lang.String adUnitNameName of ad unit. Maximum length is 100 symbols. If the value exceeds this limit it will be truncated by AppMetrica. -
adPlacementId
@Nullable public final java.lang.String adPlacementIdId of ad placement. Maximum length is 100 symbols. If the value exceeds this limit it will be truncated by AppMetrica. -
adPlacementName
@Nullable public final java.lang.String adPlacementNameName of ad placement. Maximum length is 100 symbols. If the value exceeds this limit it will be truncated by AppMetrica. -
precision
@Nullable public final java.lang.String precisionPrecision. Example: "publisher_defined", "estimated". Maximum length is 100 symbols. If the value exceeds this limit it will be truncated by AppMetrica. -
payload
@Nullable public final java.util.Map<java.lang.String,java.lang.String> payloadArbitrary payload: additional info represented as key-value pairs. Maximum size is 30 KB. If the value exceeds this limit it will be truncated by AppMetrica.
-
-
Method Details
-
newBuilder
public static AdRevenue.Builder newBuilder(@NonNull java.math.BigDecimal adRevenue, @NonNull java.util.Currency currency)Creates the new instance ofAdRevenue.Builder.- Parameters:
adRevenue- Amount of money received via ad revenue.currency- Currency.- Returns:
- new
AdRevenue.Builderinstance. - See Also:
adRevenue,currency
-
newBuilder
public static AdRevenue.Builder newBuilder(long adRevenueMicros, @NonNull java.util.Currency currency)Creates the new instance ofAdRevenue.Builder.- Parameters:
adRevenueMicros- Amount of money received via ad revenue represented as micros (actual value multiplied by 10^6). It will be converted toBigDecimal.currency- Currency.- Returns:
- new
AdRevenue.Builderinstance. - See Also:
adRevenue,currency
-
newBuilder
Creates the new instance ofAdRevenue.Builder.- Parameters:
adRevenue- Amount of money received via ad revenue represented as double. It will be converted toBigDecimal. Note that for that purpose AppMetrica usesBigDecimal(double)} constructor which can yield unpredictable results for values that cannot be precisely represented as double.currency- Currency.- Returns:
- new
AdRevenue.Builderinstance. - See Also:
adRevenue,currency
-