Interface SubRate
public interface SubRate
It is used to calculate the taxPortions field in a Cart or Order.
Example to create an instance using the builder pattern
SubRate subRate = SubRate.builder()
.name("{name}")
.amount(0.3)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic SubRateBuilderbuilder()builder factory method for SubRatestatic SubRateBuildercreate builder for SubRate instancecopyDeep()static SubRatefactory method to create a deep copy of SubRate@NotNull Double@NotNull StringgetName()Name of the SubRate.static SubRateof()factory methodstatic SubRatefactory method to create a shallow copy SubRatevoidset amountvoidName of the SubRate.static com.fasterxml.jackson.core.type.TypeReference<SubRate>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithSubRate(Function<SubRate, T> helper) accessor map function
-
Method Details
-
getName
Name of the SubRate.
- Returns:
- name
-
getAmount
- Returns:
- amount
-
setName
Name of the SubRate.
- Parameters:
name- value to be set
-
setAmount
set amount- Parameters:
amount- value to be set
-
of
factory method- Returns:
- instance of SubRate
-
of
factory method to create a shallow copy SubRate- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
SubRate copyDeep() -
deepCopy
factory method to create a deep copy of SubRate- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for SubRate- Returns:
- builder
-
builder
create builder for SubRate instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withSubRate
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
-