com.yandex.metrica.ecommerce
Class ECommerceCartItem
java.lang.Object
com.yandex.metrica.ecommerce.ECommerceCartItem
public class ECommerceCartItem
extends java.lang.Object
Класс с информацией о товаре в корзине.
Constructor Summary
Constructor and Description |
---|
ECommerceCartItem(ECommerceProduct product, ECommercePrice revenue, java.math.BigDecimal quantity)
Создает CartItem.
|
ECommerceCartItem(ECommerceProduct product, ECommercePrice revenue, double quantity)
Создает CartItem.
|
ECommerceCartItem(ECommerceProduct product, ECommercePrice revenue, long quantityMicros)
Создает CartItem.
|
Method Summary
Modifier and Type | Method and Description |
---|---|
ECommerceProduct | getProduct() |
java.math.BigDecimal | getQuantity() |
ECommerceReferrer | getReferrer() |
ECommercePrice | getRevenue() |
ECommerceCartItem | setReferrer(ECommerceReferrer referrer)
Задает источник перехода в корзину.
|
java.lang.String | toString() |
Constructor Detail
ECommerceCartItem
public ECommerceCartItem(@NonNull ECommerceProduct product, @NonNull ECommercePrice revenue, long quantityMicros)
Создает CartItem.
- Parameters:
product
- Товар.revenue
- Общая цена товара в корзине. Учитывает количество, применяемые скидки и т. д.quantityMicros
- Количество товара в микро-значении. Рассчитывается по формуле: quantityMicros = quantity × 10^6.- See Also:
ECommerceProduct
,ECommercePrice
,ECommerceCartItem(ECommerceProduct, ECommercePrice, double)
,ECommerceCartItem(ECommerceProduct, ECommercePrice, java.math.BigDecimal)
ECommerceCartItem
public ECommerceCartItem(@NonNull ECommerceProduct product, @NonNull ECommercePrice revenue, double quantity)
Создает CartItem.
- Parameters:
product
- Товар.revenue
- Общая цена товара в корзине. Учитывает количество, применяемые скидки и т. д.quantity
- Удвоенное количество товара.Double.POSITIVE_INFINITY
,Double.NEGATIVE_INFINITY
иDouble.NaN
рассматриваются как 0.- See Also:
ECommerceProduct
,ECommercePrice
,ECommerceCartItem(ECommerceProduct, ECommercePrice, long)
,ECommerceCartItem(ECommerceProduct, ECommercePrice, java.math.BigDecimal)
ECommerceCartItem
public ECommerceCartItem(@NonNull ECommerceProduct product, @NonNull ECommercePrice revenue, @NonNull java.math.BigDecimal quantity)
Создает CartItem.
- Parameters:
product
- Товар.revenue
- Общая цена товара в корзине. Учитывает количество, применяемые скидки и т. д.quantity
- Количество товара, которое задаетсяBigDecimal
.- See Also:
ECommerceProduct
,ECommercePrice
,ECommerceCartItem(ECommerceProduct, ECommercePrice, long)
,ECommerceCartItem(ECommerceProduct, ECommercePrice, double)
Method Detail
getProduct
@NonNull public ECommerceProduct getProduct()
getQuantity
@NonNull public java.math.BigDecimal getQuantity()
getRevenue
@NonNull public ECommercePrice getRevenue()
setReferrer
@NonNull public ECommerceCartItem setReferrer(@Nullable ECommerceReferrer referrer)
Задает источник перехода в корзину.
- Parameters:
referrer
- Источник перехода в корзину.- Returns:
- Объект класса
ECommerceCartItem
. - See Also:
ECommerceReferrer
getReferrer
@Nullable public ECommerceReferrer getReferrer()
- Returns:
- Объект класса
ECommerceReferrer
. - See Also:
Возвращает источник перехода в корзину.
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object