Class ReviewRatingSetMessagePayloadBuilder

java.lang.Object
com.commercetools.api.models.message.ReviewRatingSetMessagePayloadBuilder
All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<ReviewRatingSetMessagePayload>

public class ReviewRatingSetMessagePayloadBuilder extends Object implements io.vrap.rmf.base.client.Builder<ReviewRatingSetMessagePayload>
ReviewRatingSetMessagePayloadBuilder
Example to create an instance using the builder pattern

     ReviewRatingSetMessagePayload reviewRatingSetMessagePayload = ReviewRatingSetMessagePayload.builder()
             .includedInStatistics(true)
             .build()
 
  • Constructor Details

    • ReviewRatingSetMessagePayloadBuilder

      public ReviewRatingSetMessagePayloadBuilder()
  • Method Details

    • oldRating

      The rating of the Review before the Set Rating update action.

      Parameters:
      oldRating - value to be set
      Returns:
      Builder
    • newRating

      The rating of the Review after the Set Rating update action.

      Parameters:
      newRating - value to be set
      Returns:
      Builder
    • includedInStatistics

      public ReviewRatingSetMessagePayloadBuilder includedInStatistics(Boolean includedInStatistics)

      Whether the Review was taken into account in the ratings statistics of the target.

      Parameters:
      includedInStatistics - value to be set
      Returns:
      Builder
    • target

      Reference to the resource that the Review belongs to.

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

      public ReviewRatingSetMessagePayloadBuilder target(Function<ReferenceBuilder,io.vrap.rmf.base.client.Builder<? extends Reference>> builder)

      Reference to the resource that the Review belongs to.

      Parameters:
      builder - function to build the target value
      Returns:
      Builder
    • getOldRating

      @Nullable public Double getOldRating()

      The rating of the Review before the Set Rating update action.

      Returns:
      oldRating
    • getNewRating

      @Nullable public Double getNewRating()

      The rating of the Review after the Set Rating update action.

      Returns:
      newRating
    • getIncludedInStatistics

      public Boolean getIncludedInStatistics()

      Whether the Review was taken into account in the ratings statistics of the target.

      Returns:
      includedInStatistics
    • getTarget

      @Nullable public Reference getTarget()

      Reference to the resource that the Review belongs to.

      Returns:
      target
    • build

      builds ReviewRatingSetMessagePayload with checking for non-null required values
      Specified by:
      build in interface io.vrap.rmf.base.client.Builder<ReviewRatingSetMessagePayload>
      Returns:
      ReviewRatingSetMessagePayload
    • buildUnchecked

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

      factory method for an instance of ReviewRatingSetMessagePayloadBuilder
      Returns:
      builder
    • of

      create builder for ReviewRatingSetMessagePayload instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder