Class ReviewUpdateBuilder

java.lang.Object
com.commercetools.api.models.review.ReviewUpdateBuilder
All Implemented Interfaces:
Builder<ReviewUpdate>

public class ReviewUpdateBuilder extends Object implements Builder<ReviewUpdate>
ReviewUpdateBuilder
Example to create an instance using the builder pattern

     ReviewUpdate reviewUpdate = ReviewUpdate.builder()
             .version(0.3)
             .plusActions(actionsBuilder -> actionsBuilder)
             .build()
 
  • Constructor Details

    • ReviewUpdateBuilder

      public ReviewUpdateBuilder()
  • Method Details

    • version

      public ReviewUpdateBuilder version(Long 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

      public ReviewUpdateBuilder actions(ReviewUpdateAction... actions)

      The list of update actions to be performed on the review.

      Parameters:
      actions - value to be set
      Returns:
      Builder
    • actions

      public ReviewUpdateBuilder actions(List<ReviewUpdateAction> actions)

      The list of update actions to be performed on the review.

      Parameters:
      actions - value to be set
      Returns:
      Builder
    • plusActions

      public ReviewUpdateBuilder plusActions(ReviewUpdateAction... 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:
      builder - function to build the actions value
      Returns:
      Builder
    • withActions

      The list of update actions to be performed on the review.

      Parameters:
      builder - function to build the actions value
      Returns:
      Builder
    • getVersion

      public Long 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

      public List<ReviewUpdateAction> getActions()

      The list of update actions to be performed on the review.

      Returns:
      actions
    • build

      public ReviewUpdate build()
      builds ReviewUpdate with checking for non-null required values
      Specified by:
      build in interface Builder<ReviewUpdate>
      Returns:
      ReviewUpdate
    • buildUnchecked

      public ReviewUpdate buildUnchecked()
      builds ReviewUpdate without checking for non-null required values
      Returns:
      ReviewUpdate
    • of

      public static ReviewUpdateBuilder of()
      factory method for an instance of ReviewUpdateBuilder
      Returns:
      builder
    • of

      public static ReviewUpdateBuilder of(ReviewUpdate template)
      create builder for ReviewUpdate instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder