Class ZoneRateBuilder
java.lang.Object
com.commercetools.api.models.shipping_method.ZoneRateBuilder
ZoneRateBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ZoneRate zoneRate = ZoneRate.builder()
.zone(zoneBuilder -> zoneBuilder)
.plusShippingRates(shippingRatesBuilder -> shippingRatesBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionShipping rates defined per currency.build()
builds ZoneRate with checking for non-null required valuesbuilds ZoneRate without checking for non-null required valuesShipping rates defined per currency.getZone()
Zone for which the shipping rates are valid.static ZoneRateBuilder
of()
factory method for an instance of ZoneRateBuilderstatic ZoneRateBuilder
create builder for ZoneRate instanceplusShippingRates
(ShippingRate... shippingRates) Shipping rates defined per currency.Shipping rates defined per currency.Shipping rates defined per currency.shippingRates
(ShippingRate... shippingRates) Shipping rates defined per currency.shippingRates
(List<ShippingRate> shippingRates) Shipping rates defined per currency.Shipping rates defined per currency.withZone
(Function<ZoneReferenceBuilder, ZoneReference> builder) Zone for which the shipping rates are valid.zone
(ZoneReference zone) Zone for which the shipping rates are valid.zone
(Function<ZoneReferenceBuilder, ZoneReferenceBuilder> builder) Zone for which the shipping rates are valid.
-
Constructor Details
-
ZoneRateBuilder
public ZoneRateBuilder()
-
-
Method Details
-
zone
Zone for which the shipping rates are valid.
- Parameters:
builder
- function to build the zone value- Returns:
- Builder
-
withZone
Zone for which the shipping rates are valid.
- Parameters:
builder
- function to build the zone value- Returns:
- Builder
-
zone
Zone for which the shipping rates are valid.
- Parameters:
zone
- value to be set- Returns:
- Builder
-
shippingRates
Shipping rates defined per currency.
- Parameters:
shippingRates
- value to be set- Returns:
- Builder
-
shippingRates
Shipping rates defined per currency.
- Parameters:
shippingRates
- value to be set- Returns:
- Builder
-
plusShippingRates
Shipping rates defined per currency.
- Parameters:
shippingRates
- value to be set- Returns:
- Builder
-
plusShippingRates
Shipping rates defined per currency.
- Parameters:
builder
- function to build the shippingRates value- Returns:
- Builder
-
withShippingRates
Shipping rates defined per currency.
- Parameters:
builder
- function to build the shippingRates value- Returns:
- Builder
-
addShippingRates
Shipping rates defined per currency.
- Parameters:
builder
- function to build the shippingRates value- Returns:
- Builder
-
setShippingRates
Shipping rates defined per currency.
- Parameters:
builder
- function to build the shippingRates value- Returns:
- Builder
-
getZone
Zone for which the shipping rates are valid.
- Returns:
- zone
-
getShippingRates
Shipping rates defined per currency.
- Returns:
- shippingRates
-
build
builds ZoneRate with checking for non-null required values -
buildUnchecked
builds ZoneRate without checking for non-null required values- Returns:
- ZoneRate
-
of
factory method for an instance of ZoneRateBuilder- Returns:
- builder
-
of
create builder for ZoneRate instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-