Package io.appmetrica.analytics
Class AdRevenue
java.lang.Object
io.appmetrica.analytics.AdRevenue
The class to store Ad Revenue data.
The Ad Revenue object should be passed to the AppMetrica by using the
AppMetrica.reportAdRevenue(AdRevenue)
or IReporter.reportAdRevenue(AdRevenue)method.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal StringAd network.final StringId of ad placement.final StringName of ad placement.final BigDecimalAmount of money received via ad revenue.final AdTypeAd type.final StringId of ad unit.final StringName of ad unit.final CurrencyCurrency in which money from `adRevenue` is represented.Arbitrary payload: additional info represented as key-value pairs.final StringPrecision. -
Method Summary
Modifier and TypeMethodDescriptionstatic AdRevenue.BuildernewBuilder(double adRevenue, Currency currency) Creates the new instance ofAdRevenue.Builder.static AdRevenue.BuildernewBuilder(long adRevenueMicros, Currency currency) Creates the new instance ofAdRevenue.Builder.static AdRevenue.BuildernewBuilder(BigDecimal adRevenue, Currency currency) Creates the new instance ofAdRevenue.Builder.
-
Field Details
-
adRevenue
Amount of money received via ad revenue. It cannot be negative. -
currency
Currency in which money from `adRevenue` is represented. -
adType
Ad type. See possible values inAdType. -
adNetwork
Ad network. Maximum length is 100 symbols. If the value exceeds this limit it will be truncated by AppMetrica. -
adUnitId
Id of ad unit. Maximum length is 100 symbols. If the value exceeds this limit it will be truncated by AppMetrica. -
adUnitName
Name of ad unit. Maximum length is 100 symbols. If the value exceeds this limit it will be truncated by AppMetrica. -
adPlacementId
Id of ad placement. Maximum length is 100 symbols. If the value exceeds this limit it will be truncated by AppMetrica. -
adPlacementName
Name of ad placement. Maximum length is 100 symbols. If the value exceeds this limit it will be truncated by AppMetrica. -
precision
Precision. Example: "publisher_defined", "estimated". Maximum length is 100 symbols. If the value exceeds this limit it will be truncated by AppMetrica. -
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 Details
-
newBuilder
public static AdRevenue.Builder newBuilder(@NonNull BigDecimal adRevenue, @NonNull 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:
-
newBuilder
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:
-
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:
-