Class ReviewUpdateBuilder
java.lang.Object
com.commercetools.api.models.review.ReviewUpdateBuilder
- All Implemented Interfaces:
Builder<ReviewUpdate>
ReviewUpdateBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ReviewUpdate reviewUpdate = ReviewUpdate.builder()
.version(0.3)
.plusActions(actionsBuilder -> actionsBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionactions
(ReviewUpdateAction... actions) The list of update actions to be performed on the review.actions
(List<ReviewUpdateAction> actions) The list of update actions to be performed on the review.build()
builds ReviewUpdate with checking for non-null required valuesbuilds ReviewUpdate without checking for non-null required valuesThe list of update actions to be performed on the review.The expected version of the review on which the changes should be applied.static ReviewUpdateBuilder
of()
factory method for an instance of ReviewUpdateBuilderstatic ReviewUpdateBuilder
of
(ReviewUpdate template) create builder for ReviewUpdate instanceplusActions
(ReviewUpdateAction... actions) The list of update actions to be performed on the review.plusActions
(Function<ReviewUpdateActionBuilder, Builder<? extends ReviewUpdateAction>> builder) The list of update actions to be performed on the review.The expected version of the review on which the changes should be applied.withActions
(Function<ReviewUpdateActionBuilder, Builder<? extends ReviewUpdateAction>> builder) The list of update actions to be performed on the review.
-
Constructor Details
-
ReviewUpdateBuilder
public ReviewUpdateBuilder()
-
-
Method Details
-
version
The expected version of the review 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
The list of update actions to be performed on the review.
- Parameters:
actions
- value to be set- Returns:
- Builder
-
actions
The list of update actions to be performed on the review.
- Parameters:
actions
- value to be set- Returns:
- Builder
-
plusActions
The list of update actions to be performed on the review.
- Parameters:
actions
- value to be set- Returns:
- Builder
-
plusActions
public ReviewUpdateBuilder plusActions(Function<ReviewUpdateActionBuilder, Builder<? extends ReviewUpdateAction>> builder) The list of update actions to be performed on the review.
- Parameters:
builder
- function to build the actions value- Returns:
- Builder
-
withActions
public ReviewUpdateBuilder withActions(Function<ReviewUpdateActionBuilder, Builder<? extends ReviewUpdateAction>> builder) The list of update actions to be performed on the review.
- Parameters:
builder
- function to build the actions value- Returns:
- Builder
-
getVersion
The expected version of the review 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
The list of update actions to be performed on the review.
- Returns:
- actions
-
build
builds ReviewUpdate with checking for non-null required values- Specified by:
build
in interfaceBuilder<ReviewUpdate>
- Returns:
- ReviewUpdate
-
buildUnchecked
builds ReviewUpdate without checking for non-null required values- Returns:
- ReviewUpdate
-
of
factory method for an instance of ReviewUpdateBuilder- Returns:
- builder
-
of
create builder for ReviewUpdate instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-