public class Price
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Price.Builder |
Modifier and Type | Field and Description |
---|---|
private java.math.BigDecimal |
amount
Price amount.
|
private java.util.Currency |
currency
Currency code.
|
private java.lang.String |
formatted
Localized and formatted value, including a shop-specific prefix, like "from".
|
private java.util.Locale |
locale |
private TaxType |
taxType
Indicates if the amount includes tax
TaxType.GROSS or not
TaxType.NET . |
Constructor and Description |
---|
Price() |
Modifier and Type | Method and Description |
---|---|
static Price.Builder |
create() |
static Price.Builder |
create(Price price) |
java.math.BigDecimal |
getAmount()
Amount of price
|
java.util.Currency |
getCurrency()
Currency of price
|
java.lang.String |
getFormatted()
Formatted value, including amount and currency.
|
java.util.Locale |
getLocale() |
TaxType |
getTaxType()
Type of tax applicable for the price
|
void |
setAmount(java.math.BigDecimal amount) |
void |
setCurrency(java.util.Currency currency) |
void |
setFormatted(java.lang.String formattedPrice) |
void |
setLocale(java.util.Locale locale) |
void |
setTaxType(TaxType taxType) |
private java.math.BigDecimal amount
private TaxType taxType
TaxType.GROSS
or not
TaxType.NET
.private java.util.Currency currency
private java.util.Locale locale
private java.lang.String formatted
public static final Price.Builder create()
public static Price.Builder create(Price price)
public java.math.BigDecimal getAmount()
public void setAmount(java.math.BigDecimal amount)
public TaxType getTaxType()
public void setTaxType(TaxType taxType)
public java.util.Currency getCurrency()
public void setCurrency(java.util.Currency currency)
public java.util.Locale getLocale()
public void setLocale(java.util.Locale locale)
public java.lang.String getFormatted()
public void setFormatted(java.lang.String formattedPrice)