Interface ZoneRate
public interface ZoneRate
Defines shipping rates in different currencies for a specific Zone.
Example to create an instance using the builder pattern
ZoneRate zoneRate = ZoneRate.builder()
.zone(zoneBuilder -> zoneBuilder)
.plusShippingRates(shippingRatesBuilder -> shippingRatesBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ZoneRateBuilderbuilder()builder factory method for ZoneRatestatic ZoneRateBuildercreate builder for ZoneRate instancecopyDeep()static ZoneRatefactory method to create a deep copy of ZoneRate@NotNull @Valid List<ShippingRate>Shipping rates defined per currency.@NotNull @Valid ZoneReferencegetZone()Zone for which the shipping rates are valid.static ZoneRateof()factory methodstatic ZoneRatefactory method to create a shallow copy ZoneRatevoidsetShippingRates(ShippingRate... shippingRates) Shipping rates defined per currency.voidsetShippingRates(List<ShippingRate> shippingRates) Shipping rates defined per currency.voidsetZone(ZoneReference zone) Zone for which the shipping rates are valid.static com.fasterxml.jackson.core.type.TypeReference<ZoneRate>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithZoneRate(Function<ZoneRate, T> helper) accessor map function
-
Method Details
-
getZone
Zone for which the shipping rates are valid.
- Returns:
- zone
-
getShippingRates
Shipping rates defined per currency.
- Returns:
- shippingRates
-
setZone
Zone for which the shipping rates are valid.
- Parameters:
zone- value to be set
-
setShippingRates
Shipping rates defined per currency.
- Parameters:
shippingRates- values to be set
-
setShippingRates
Shipping rates defined per currency.
- Parameters:
shippingRates- values to be set
-
of
factory method- Returns:
- instance of ZoneRate
-
of
factory method to create a shallow copy ZoneRate- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
ZoneRate copyDeep() -
deepCopy
factory method to create a deep copy of ZoneRate- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ZoneRate- Returns:
- builder
-
builder
create builder for ZoneRate instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withZoneRate
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
-