Interface TaxRate
public interface TaxRate
TaxRate
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
TaxRate taxRate = TaxRate.builder()
.name("{name}")
.amount(0.3)
.includedInPrice(true)
.country("{country}")
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic TaxRateBuilder
builder()
builder factory method for TaxRatestatic TaxRateBuilder
create builder for TaxRate instancestatic TaxRate
factory method to create a deep copy of TaxRate@NotNull Double
@NotNull String
A two-digit country code as per ISO 3166-1 alpha-2.getId()
@NotNull Boolean
@NotNull String
getName()
getState()
static TaxRate
of()
factory methodstatic TaxRate
factory method to create a shallow copy TaxRatevoid
set amountvoid
setCountry
(String country) A two-digit country code as per ISO 3166-1 alpha-2.void
set idvoid
setIncludedInPrice
(Boolean includedInPrice) set includedInPricevoid
set namevoid
set statevoid
setSubRates
(SubRate... subRates) set subRatesvoid
setSubRates
(List<SubRate> subRates) set subRatesstatic com.fasterxml.jackson.core.type.TypeReference<TaxRate>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withTaxRate
(Function<TaxRate, T> helper) accessor map function
-
Method Details
-
getId
String getId()- Returns:
- id
-
getName
- Returns:
- name
-
getAmount
- Returns:
- amount
-
getIncludedInPrice
- Returns:
- includedInPrice
-
getCountry
A two-digit country code as per ISO 3166-1 alpha-2.
- Returns:
- country
-
getState
String getState()- Returns:
- state
-
getSubRates
- Returns:
- subRates
-
setId
set id- Parameters:
id
- value to be set
-
setName
set name- Parameters:
name
- value to be set
-
setAmount
set amount- Parameters:
amount
- value to be set
-
setIncludedInPrice
set includedInPrice- Parameters:
includedInPrice
- value to be set
-
setCountry
A two-digit country code as per ISO 3166-1 alpha-2.
- Parameters:
country
- value to be set
-
setState
set state- Parameters:
state
- value to be set
-
setSubRates
set subRates- Parameters:
subRates
- values to be set
-
setSubRates
set subRates- Parameters:
subRates
- values to be set
-
of
factory method- Returns:
- instance of TaxRate
-
of
factory method to create a shallow copy TaxRate- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of TaxRate- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for TaxRate- Returns:
- builder
-
builder
create builder for TaxRate instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withTaxRate
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-