Interface ZoneRateDraft
- All Superinterfaces:
Draft<ZoneRateDraft>
ZoneRateDraft
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ZoneRateDraft zoneRateDraft = ZoneRateDraft.builder()
.zone(zoneBuilder -> zoneBuilder)
.plusShippingRates(shippingRatesBuilder -> shippingRatesBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ZoneRateDraftBuilder
builder()
builder factory method for ZoneRateDraftstatic ZoneRateDraftBuilder
builder
(ZoneRateDraft template) create builder for ZoneRateDraft instancestatic ZoneRateDraft
deepCopy
(ZoneRateDraft template) factory method to create a deep copy of ZoneRateDraft@NotNull @Valid List<ShippingRateDraft>
Shipping rates for thecurrencies
configured in the Project.@NotNull @Valid ZoneResourceIdentifier
getZone()
Sets the Zone for which the shippng rates are valid.static ZoneRateDraft
of()
factory methodstatic ZoneRateDraft
of
(ZoneRateDraft template) factory method to create a shallow copy ZoneRateDraftvoid
setShippingRates
(ShippingRateDraft... shippingRates) Shipping rates for thecurrencies
configured in the Project.void
setShippingRates
(List<ShippingRateDraft> shippingRates) Shipping rates for thecurrencies
configured in the Project.void
Sets the Zone for which the shippng rates are valid.static com.fasterxml.jackson.core.type.TypeReference<ZoneRateDraft>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withZoneRateDraft
(Function<ZoneRateDraft, T> helper) accessor map function
-
Method Details
-
getZone
Sets the Zone for which the shippng rates are valid.
- Returns:
- zone
-
getShippingRates
Shipping rates for the
currencies
configured in the Project. The array must not contain two ShippingRates with the same CurrencyCode.- Returns:
- shippingRates
-
setZone
Sets the Zone for which the shippng rates are valid.
- Parameters:
zone
- value to be set
-
setShippingRates
Shipping rates for the
currencies
configured in the Project. The array must not contain two ShippingRates with the same CurrencyCode.- Parameters:
shippingRates
- values to be set
-
setShippingRates
Shipping rates for the
currencies
configured in the Project. The array must not contain two ShippingRates with the same CurrencyCode.- Parameters:
shippingRates
- values to be set
-
of
factory method- Returns:
- instance of ZoneRateDraft
-
of
factory method to create a shallow copy ZoneRateDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of ZoneRateDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ZoneRateDraft- Returns:
- builder
-
builder
create builder for ZoneRateDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withZoneRateDraft
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
-