Class ShippingMethodUpdateBuilder
java.lang.Object
com.commercetools.api.models.shipping_method.ShippingMethodUpdateBuilder
- All Implemented Interfaces:
Builder<ShippingMethodUpdate>
ShippingMethodUpdateBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ShippingMethodUpdate shippingMethodUpdate = ShippingMethodUpdate.builder()
.version(0.3)
.plusActions(actionsBuilder -> actionsBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionactions
(ShippingMethodUpdateAction... actions) Update actions to be performed on the ShippingMethod.actions
(List<ShippingMethodUpdateAction> actions) Update actions to be performed on the ShippingMethod.build()
builds ShippingMethodUpdate with checking for non-null required valuesbuilds ShippingMethodUpdate without checking for non-null required valuesUpdate actions to be performed on the ShippingMethod.Expected version of the ShippingMethod on which the changes should be applied.static ShippingMethodUpdateBuilder
of()
factory method for an instance of ShippingMethodUpdateBuilderstatic ShippingMethodUpdateBuilder
of
(ShippingMethodUpdate template) create builder for ShippingMethodUpdate instanceplusActions
(ShippingMethodUpdateAction... actions) Update actions to be performed on the ShippingMethod.plusActions
(Function<ShippingMethodUpdateActionBuilder, Builder<? extends ShippingMethodUpdateAction>> builder) Update actions to be performed on the ShippingMethod.Expected version of the ShippingMethod on which the changes should be applied.withActions
(Function<ShippingMethodUpdateActionBuilder, Builder<? extends ShippingMethodUpdateAction>> builder) Update actions to be performed on the ShippingMethod.
-
Constructor Details
-
ShippingMethodUpdateBuilder
public ShippingMethodUpdateBuilder()
-
-
Method Details
-
version
Expected version of the ShippingMethod on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.
- Parameters:
version
- value to be set- Returns:
- Builder
-
actions
Update actions to be performed on the ShippingMethod.
- Parameters:
actions
- value to be set- Returns:
- Builder
-
actions
Update actions to be performed on the ShippingMethod.
- Parameters:
actions
- value to be set- Returns:
- Builder
-
plusActions
Update actions to be performed on the ShippingMethod.
- Parameters:
actions
- value to be set- Returns:
- Builder
-
plusActions
public ShippingMethodUpdateBuilder plusActions(Function<ShippingMethodUpdateActionBuilder, Builder<? extends ShippingMethodUpdateAction>> builder) Update actions to be performed on the ShippingMethod.
- Parameters:
builder
- function to build the actions value- Returns:
- Builder
-
withActions
public ShippingMethodUpdateBuilder withActions(Function<ShippingMethodUpdateActionBuilder, Builder<? extends ShippingMethodUpdateAction>> builder) Update actions to be performed on the ShippingMethod.
- Parameters:
builder
- function to build the actions value- Returns:
- Builder
-
getVersion
Expected version of the ShippingMethod on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.
- Returns:
- version
-
getActions
Update actions to be performed on the ShippingMethod.
- Returns:
- actions
-
build
builds ShippingMethodUpdate with checking for non-null required values- Specified by:
build
in interfaceBuilder<ShippingMethodUpdate>
- Returns:
- ShippingMethodUpdate
-
buildUnchecked
builds ShippingMethodUpdate without checking for non-null required values- Returns:
- ShippingMethodUpdate
-
of
factory method for an instance of ShippingMethodUpdateBuilder- Returns:
- builder
-
of
create builder for ShippingMethodUpdate instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-