Class TaxRateImpl
- All Implemented Interfaces:
TaxRate
,io.vrap.rmf.base.client.ModelBase
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vrap.rmf.base.client.ModelBase
io.vrap.rmf.base.client.ModelBase.FilteredRecursiveToStringStyle
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Tax rate.Country in which the tax rate is applied in ISO 3166-1 alpha-2 format.getId()
Present if the TaxRate is part of a TaxCategory.Iftrue
, tax is included in Embedded Prices or Standalone Prices, and thetaxedPrice
is present on LineItems.getKey()
User-defined unique identifier of the TaxRate.getName()
Name of the TaxRate.getState()
State within the country, such as Texas in the United States.Used to calculate the taxPortions field in a Cart or Order.int
hashCode()
void
Tax rate.void
setCountry
(String country) Country in which the tax rate is applied in ISO 3166-1 alpha-2 format.void
Present if the TaxRate is part of a TaxCategory.void
setIncludedInPrice
(Boolean includedInPrice) Iftrue
, tax is included in Embedded Prices or Standalone Prices, and thetaxedPrice
is present on LineItems.void
User-defined unique identifier of the TaxRate.void
Name of the TaxRate.void
State within the country, such as Texas in the United States.void
setSubRates
(SubRate... subRates) Used to calculate the taxPortions field in a Cart or Order.void
setSubRates
(List<SubRate> subRates) Used to calculate the taxPortions field in a Cart or Order.toString()
Methods inherited from interface io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
Methods inherited from interface com.commercetools.api.models.tax_category.TaxRate
withTaxRate
-
Constructor Details
-
TaxRateImpl
public TaxRateImpl()create empty instance
-
-
Method Details
-
getId
Present if the TaxRate is part of a TaxCategory. Absent for external TaxRates in LineItem, CustomLineItem, and ShippingInfo.
-
getKey
User-defined unique identifier of the TaxRate. Present when set using TaxRateDraft. Not available for external TaxRates created using ExternalTaxRateDraft.
-
getName
Name of the TaxRate.
-
getAmount
Tax rate. If subrates are used, the amount is the sum of all rates in
subRates
. -
getIncludedInPrice
If
true
, tax is included in Embedded Prices or Standalone Prices, and thetaxedPrice
is present on LineItems. In this case, thetotalNet
price on TaxedPrice includes the TaxRate.- Specified by:
getIncludedInPrice
in interfaceTaxRate
- Returns:
- includedInPrice
-
getCountry
Country in which the tax rate is applied in ISO 3166-1 alpha-2 format.
- Specified by:
getCountry
in interfaceTaxRate
- Returns:
- country
-
getState
State within the country, such as Texas in the United States.
-
getSubRates
Used to calculate the taxPortions field in a Cart or Order. It is useful if the total tax of a country (such as the US) is a combination of multiple taxes (such as state and local taxes). The total of all subrates equals the TaxRate
amount
.- Specified by:
getSubRates
in interfaceTaxRate
- Returns:
- subRates
-
setId
Description copied from interface:TaxRate
Present if the TaxRate is part of a TaxCategory. Absent for external TaxRates in LineItem, CustomLineItem, and ShippingInfo.
-
setKey
Description copied from interface:TaxRate
User-defined unique identifier of the TaxRate. Present when set using TaxRateDraft. Not available for external TaxRates created using ExternalTaxRateDraft.
-
setName
Description copied from interface:TaxRate
Name of the TaxRate.
-
setAmount
Description copied from interface:TaxRate
Tax rate. If subrates are used, the amount is the sum of all rates in
subRates
. -
setIncludedInPrice
Description copied from interface:TaxRate
If
true
, tax is included in Embedded Prices or Standalone Prices, and thetaxedPrice
is present on LineItems. In this case, thetotalNet
price on TaxedPrice includes the TaxRate.- Specified by:
setIncludedInPrice
in interfaceTaxRate
- Parameters:
includedInPrice
- value to be set
-
setCountry
Description copied from interface:TaxRate
Country in which the tax rate is applied in ISO 3166-1 alpha-2 format.
- Specified by:
setCountry
in interfaceTaxRate
- Parameters:
country
- value to be set
-
setState
Description copied from interface:TaxRate
State within the country, such as Texas in the United States.
-
setSubRates
Description copied from interface:TaxRate
Used to calculate the taxPortions field in a Cart or Order. It is useful if the total tax of a country (such as the US) is a combination of multiple taxes (such as state and local taxes). The total of all subrates equals the TaxRate
amount
.- Specified by:
setSubRates
in interfaceTaxRate
- Parameters:
subRates
- values to be set
-
setSubRates
Description copied from interface:TaxRate
Used to calculate the taxPortions field in a Cart or Order. It is useful if the total tax of a country (such as the US) is a combination of multiple taxes (such as state and local taxes). The total of all subrates equals the TaxRate
amount
.- Specified by:
setSubRates
in interfaceTaxRate
- Parameters:
subRates
- values to be set
-
equals
-
hashCode
public int hashCode() -
toString
-