public class Tax
extends java.lang.Object
Constructor and Description |
---|
Tax(java.lang.String country,
java.util.Collection<java.lang.String> regions,
float rate,
java.lang.Boolean taxShip)
Creates a tax object.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCountry()
Gets the destination country, or null.
|
float |
getRate()
Gets the tax rate.
|
java.util.Collection<java.lang.String> |
getRegions()
Gets the regions.
|
java.lang.Boolean |
getTaxShip()
Gets the taxShip, or null.
|
java.lang.String |
toString() |
public Tax(java.lang.String country, java.util.Collection<java.lang.String> regions, float rate, java.lang.Boolean taxShip)
country
- destination country (ISO 3312 2-letter code), can be nullregions
- A list of shipping regions within the destination country, can be null.rate
- the tax percentage rate. For example, for 6% tax rate, rate should be set to 6.taxShip
- A boolean indicating whether the shipping is taxed, can be null.public java.lang.String toString()
toString
in class java.lang.Object
public float getRate()
public java.lang.String getCountry()
public java.util.Collection<java.lang.String> getRegions()
public java.lang.Boolean getTaxShip()