public class CustomLineItem
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static CustomLineItem |
create(java.lang.String id,
LocalizedString name,
Money money,
java.lang.String slug,
int quantity,
TaxRate taxRate) |
java.lang.String |
getId()
Unique id of this line item.
|
Money |
getMoney()
The amount (price) of this line item.
|
LocalizedString |
getName()
The localized name of this line item.
|
int |
getQuantity()
Number of items.
|
java.lang.String |
getSlug()
The slug of the line item.
|
Reference<TaxCategory> |
getTaxCategory()
The tax category of the custom line item.
|
TaxRate |
getTaxRate()
The tax rate of this line item.
|
java.lang.String |
toString() |
public static CustomLineItem create(java.lang.String id, LocalizedString name, Money money, java.lang.String slug, int quantity, TaxRate taxRate)
@Nonnull public java.lang.String getId()
@Nonnull public LocalizedString getName()
@Nonnull public Money getMoney()
@Nonnull public java.lang.String getSlug()
@Nonnull public Reference<TaxCategory> getTaxCategory()
public int getQuantity()
@Nullable public TaxRate getTaxRate()
The tax rate is selected based on the cart's shipping address and is only set when the shipping address is set.
public java.lang.String toString()
toString
in class java.lang.Object