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 TypeClass and Description
static class AdRevenue.Builder
Builder class for AdRevenue objects.

Field Summary

Fields
Modifier and TypeField and Description
java.lang.StringadNetwork
Ad network.
java.lang.StringadPlacementId
Id of ad placement.
java.lang.StringadPlacementName
Name of ad placement.
java.math.BigDecimaladRevenue
Amount of money received via ad revenue.
AdTypeadType
Ad type.
java.lang.StringadUnitId
Id of ad unit.
java.lang.StringadUnitName
Name of ad unit.
java.util.Currencycurrency
Currency in which money from `adRevenue` is represented.
java.util.Map<java.lang.String,java.lang.String>payload
Arbitrary payload: additional info represented as key-value pairs.
java.lang.Stringprecision
Precision.

Method Summary

All Methods
Static Methods
Concrete Methods
Modifier and TypeMethod and Description
static AdRevenue.BuildernewBuilder(java.math.BigDecimal adRevenue, java.util.Currency currency)
Creates the new instance of AdRevenue.Builder.
static AdRevenue.BuildernewBuilder(double adRevenue, java.util.Currency currency)
Creates the new instance of AdRevenue.Builder.
static AdRevenue.BuildernewBuilder(long adRevenueMicros, java.util.Currency currency)
Creates the new instance of AdRevenue.Builder.

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

adRevenue

@NonNull
public final java.math.BigDecimal adRevenue
Amount of money received via ad revenue. It cannot be negative.

currency

@NonNull
public final java.util.Currency currency
Currency in which money from `adRevenue` is represented.

adType

@Nullable
public final AdType adType
Ad type. See possible values in AdType.

adNetwork

@Nullable
public final java.lang.String adNetwork
Ad 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 adUnitId
Id 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 adUnitName
Name 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 adPlacementId
Id 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 adPlacementName
Name 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 precision
Precision. 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> payload
Arbitrary 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 Detail

newBuilder

public static AdRevenue.Builder newBuilder(@NonNull
                                           java.math.BigDecimal adRevenue,
                                           @NonNull
                                           java.util.Currency currency)
Creates the new instance of AdRevenue.Builder.
Parameters:
adRevenue - Amount of money received via ad revenue.
currency - Currency.
Returns:
new AdRevenue.Builder instance.
See Also:
adRevenue, currency

newBuilder

public static AdRevenue.Builder newBuilder(long adRevenueMicros,
                                           @NonNull
                                           java.util.Currency currency)
Creates the new instance of AdRevenue.Builder.
Parameters:
adRevenueMicros - Amount of money received via ad revenue represented as micros (actual value multiplied by 10^6). It will be converted to BigDecimal.
currency - Currency.
Returns:
new AdRevenue.Builder instance.
See Also:
adRevenue, currency

newBuilder

public static AdRevenue.Builder newBuilder(double adRevenue,
                                           @NonNull
                                           java.util.Currency currency)
Creates the new instance of AdRevenue.Builder.
Parameters:
adRevenue - Amount of money received via ad revenue represented as double. It will be converted to BigDecimal. Note that for that purpose AppMetrica uses BigDecimal(double)} constructor which can yield unpredictable results for values that cannot be precisely represented as double.
currency - Currency.
Returns:
new AdRevenue.Builder instance.
See Also:
adRevenue, currency