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 ZoneRateBuilder
builder()
builder factory method for ZoneRatestatic ZoneRateBuilder
create builder for ZoneRate instancestatic ZoneRate
factory method to create a deep copy of ZoneRate@NotNull @Valid List<ShippingRate>
Shipping rates defined per currency.@NotNull @Valid ZoneReference
getZone()
Zone for which the shipping rates are valid.static ZoneRate
of()
factory methodstatic ZoneRate
factory method to create a shallow copy ZoneRatevoid
setShippingRates
(ShippingRate... shippingRates) Shipping rates defined per currency.void
setShippingRates
(List<ShippingRate> shippingRates) Shipping rates defined per currency.void
setZone
(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> T
withZoneRate
(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
-
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
-