public class TaxRate
extends java.lang.Object
LineItem
.Modifier and Type | Method and Description |
---|---|
static TaxRate |
create(java.lang.String name,
double amount,
boolean isIncludedInPrice,
com.neovisionaries.i18n.CountryCode country,
java.lang.String state) |
double |
getAmount()
The amount of the tax rate, in the range [0..1].
|
com.neovisionaries.i18n.CountryCode |
getCountry()
The country where this tax rate applies.
|
java.lang.String |
getName()
The name of the tax rate, such as 'General tax (19%)'.
|
java.lang.String |
getState()
The state where this tax rate applies.
|
boolean |
isIncludedInPrice()
True if the tax is included in product price.
|
java.lang.String |
toString() |
public static TaxRate create(java.lang.String name, double amount, boolean isIncludedInPrice, com.neovisionaries.i18n.CountryCode country, java.lang.String state)
@Nonnull public java.lang.String getName()
public double getAmount()
public boolean isIncludedInPrice()
If isIncludedInPrice
is true, the product price is specified as a gross price and the tax
is included in that price.
If isIncludedInPrice
is false, the product price is specified as a net price and the tax
is added on top of that price.
@Nonnull public com.neovisionaries.i18n.CountryCode getCountry()
public java.lang.String getState()
public java.lang.String toString()
toString
in class java.lang.Object