Class ZoneRateDraftBuilder
- All Implemented Interfaces:
Builder<ZoneRateDraft>
Example to create an instance using the builder pattern
ZoneRateDraft zoneRateDraft = ZoneRateDraft.builder()
.zone(zoneBuilder -> zoneBuilder)
.plusShippingRates(shippingRatesBuilder -> shippingRatesBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionShipping rates for thecurrencies
configured in the Project.build()
builds ZoneRateDraft with checking for non-null required valuesbuilds ZoneRateDraft without checking for non-null required valuesShipping rates for thecurrencies
configured in the Project.getZone()
Sets the Zone for which the shippng rates are valid.static ZoneRateDraftBuilder
of()
factory method for an instance of ZoneRateDraftBuilderstatic ZoneRateDraftBuilder
of
(ZoneRateDraft template) create builder for ZoneRateDraft instanceplusShippingRates
(ShippingRateDraft... shippingRates) Shipping rates for thecurrencies
configured in the Project.Shipping rates for thecurrencies
configured in the Project.Shipping rates for thecurrencies
configured in the Project.shippingRates
(ShippingRateDraft... shippingRates) Shipping rates for thecurrencies
configured in the Project.shippingRates
(List<ShippingRateDraft> shippingRates) Shipping rates for thecurrencies
configured in the Project.Shipping rates for thecurrencies
configured in the Project.Sets the Zone for which the shippng rates are valid.zone
(ZoneResourceIdentifier zone) Sets the Zone for which the shippng rates are valid.Sets the Zone for which the shippng rates are valid.
-
Constructor Details
-
ZoneRateDraftBuilder
public ZoneRateDraftBuilder()
-
-
Method Details
-
zone
public ZoneRateDraftBuilder zone(Function<ZoneResourceIdentifierBuilder, ZoneResourceIdentifierBuilder> builder) Sets the Zone for which the shippng rates are valid.
- Parameters:
builder
- function to build the zone value- Returns:
- Builder
-
withZone
public ZoneRateDraftBuilder withZone(Function<ZoneResourceIdentifierBuilder, ZoneResourceIdentifier> builder) Sets the Zone for which the shippng rates are valid.
- Parameters:
builder
- function to build the zone value- Returns:
- Builder
-
zone
Sets the Zone for which the shippng rates are valid.
- Parameters:
zone
- value to be set- Returns:
- Builder
-
shippingRates
Shipping rates for the
currencies
configured in the Project. The array must not contain two ShippingRates with the same CurrencyCode.- Parameters:
shippingRates
- value to be set- Returns:
- Builder
-
shippingRates
Shipping rates for the
currencies
configured in the Project. The array must not contain two ShippingRates with the same CurrencyCode.- Parameters:
shippingRates
- value to be set- Returns:
- Builder
-
plusShippingRates
Shipping rates for the
currencies
configured in the Project. The array must not contain two ShippingRates with the same CurrencyCode.- Parameters:
shippingRates
- value to be set- Returns:
- Builder
-
plusShippingRates
public ZoneRateDraftBuilder plusShippingRates(Function<ShippingRateDraftBuilder, ShippingRateDraftBuilder> builder) Shipping rates for the
currencies
configured in the Project. The array must not contain two ShippingRates with the same CurrencyCode.- Parameters:
builder
- function to build the shippingRates value- Returns:
- Builder
-
withShippingRates
public ZoneRateDraftBuilder withShippingRates(Function<ShippingRateDraftBuilder, ShippingRateDraftBuilder> builder) Shipping rates for the
currencies
configured in the Project. The array must not contain two ShippingRates with the same CurrencyCode.- Parameters:
builder
- function to build the shippingRates value- Returns:
- Builder
-
addShippingRates
public ZoneRateDraftBuilder addShippingRates(Function<ShippingRateDraftBuilder, ShippingRateDraft> builder) Shipping rates for the
currencies
configured in the Project. The array must not contain two ShippingRates with the same CurrencyCode.- Parameters:
builder
- function to build the shippingRates value- Returns:
- Builder
-
setShippingRates
public ZoneRateDraftBuilder setShippingRates(Function<ShippingRateDraftBuilder, ShippingRateDraft> builder) Shipping rates for the
currencies
configured in the Project. The array must not contain two ShippingRates with the same CurrencyCode.- Parameters:
builder
- function to build the shippingRates value- Returns:
- Builder
-
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
-
build
builds ZoneRateDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<ZoneRateDraft>
- Returns:
- ZoneRateDraft
-
buildUnchecked
builds ZoneRateDraft without checking for non-null required values- Returns:
- ZoneRateDraft
-
of
factory method for an instance of ZoneRateDraftBuilder- Returns:
- builder
-
of
create builder for ZoneRateDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-