Class ECommerceAmount
java.lang.Object
io.appmetrica.analytics.ecommerce.ECommerceAmount
Describes an amount of something - number and unit.
-
Constructor Summary
ConstructorDescriptionECommerceAmount
(double amount, String unit) Creates an amount with double value.ECommerceAmount
(long amountMicros, String unit) Creates an amount with its value in micros.ECommerceAmount
(BigDecimal amount, String unit) Creates an amount withBigDecimal
value. -
Method Summary
-
Constructor Details
-
ECommerceAmount
Creates an amount with its value in micros.- Parameters:
amountMicros
- Amount value in micros (actual amount multiplied by 10^6).unit
- Amount unit. For example, "USD" "RUB", etc.- See Also:
-
ECommerceAmount
Creates an amount with double value.- Parameters:
amount
- Amount value as double.Double.POSITIVE_INFINITY
,Double.NEGATIVE_INFINITY
andDouble.NaN
will be treated as 0.unit
- Amount unit. For example, "USD", "RUB", etc.- See Also:
-
ECommerceAmount
Creates an amount withBigDecimal
value.- Parameters:
amount
- Amount value asBigDecimal
.unit
- Amount unit. For example, "USD", "RUB", etc.- See Also:
-
-
Method Details
-
getAmount
- Returns:
- decimal amount
- See Also:
-
getUnit
-
toString
-