Class ShippingMethodAddShippingRateActionBuilder
java.lang.Object
com.commercetools.api.models.shipping_method.ShippingMethodAddShippingRateActionBuilder
- All Implemented Interfaces:
Builder<ShippingMethodAddShippingRateAction>
public class ShippingMethodAddShippingRateActionBuilder
extends Object
implements Builder<ShippingMethodAddShippingRateAction>
ShippingMethodAddShippingRateActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ShippingMethodAddShippingRateAction shippingMethodAddShippingRateAction = ShippingMethodAddShippingRateAction.builder()
.zone(zoneBuilder -> zoneBuilder)
.shippingRate(shippingRateBuilder -> shippingRateBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ShippingMethodAddShippingRateAction with checking for non-null required valuesbuilds ShippingMethodAddShippingRateAction without checking for non-null required valuesValue to add toshippingRates
.getZone()
Zone to which the ShippingRate should be added.of()
factory method for an instance of ShippingMethodAddShippingRateActionBuilderof
(ShippingMethodAddShippingRateAction template) create builder for ShippingMethodAddShippingRateAction instanceshippingRate
(ShippingRateDraft shippingRate) Value to add toshippingRates
.Value to add toshippingRates
.Value to add toshippingRates
.Zone to which the ShippingRate should be added.zone
(ZoneResourceIdentifier zone) Zone to which the ShippingRate should be added.Zone to which the ShippingRate should be added.
-
Constructor Details
-
ShippingMethodAddShippingRateActionBuilder
public ShippingMethodAddShippingRateActionBuilder()
-
-
Method Details
-
zone
public ShippingMethodAddShippingRateActionBuilder zone(Function<ZoneResourceIdentifierBuilder, ZoneResourceIdentifierBuilder> builder) Zone to which the ShippingRate should be added.
- Parameters:
builder
- function to build the zone value- Returns:
- Builder
-
withZone
public ShippingMethodAddShippingRateActionBuilder withZone(Function<ZoneResourceIdentifierBuilder, ZoneResourceIdentifier> builder) Zone to which the ShippingRate should be added.
- Parameters:
builder
- function to build the zone value- Returns:
- Builder
-
zone
Zone to which the ShippingRate should be added.
- Parameters:
zone
- value to be set- Returns:
- Builder
-
shippingRate
public ShippingMethodAddShippingRateActionBuilder shippingRate(Function<ShippingRateDraftBuilder, ShippingRateDraftBuilder> builder) Value to add to
shippingRates
.- Parameters:
builder
- function to build the shippingRate value- Returns:
- Builder
-
withShippingRate
public ShippingMethodAddShippingRateActionBuilder withShippingRate(Function<ShippingRateDraftBuilder, ShippingRateDraft> builder) Value to add to
shippingRates
.- Parameters:
builder
- function to build the shippingRate value- Returns:
- Builder
-
shippingRate
Value to add to
shippingRates
.- Parameters:
shippingRate
- value to be set- Returns:
- Builder
-
getZone
Zone to which the ShippingRate should be added.
- Returns:
- zone
-
getShippingRate
Value to add to
shippingRates
.- Returns:
- shippingRate
-
build
builds ShippingMethodAddShippingRateAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<ShippingMethodAddShippingRateAction>
- Returns:
- ShippingMethodAddShippingRateAction
-
buildUnchecked
builds ShippingMethodAddShippingRateAction without checking for non-null required values- Returns:
- ShippingMethodAddShippingRateAction
-
of
factory method for an instance of ShippingMethodAddShippingRateActionBuilder- Returns:
- builder
-
of
public static ShippingMethodAddShippingRateActionBuilder of(ShippingMethodAddShippingRateAction template) create builder for ShippingMethodAddShippingRateAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-