Class QuoteUpdateBuilder

java.lang.Object
com.commercetools.api.models.quote.QuoteUpdateBuilder
All Implemented Interfaces:
Builder<QuoteUpdate>

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

     QuoteUpdate quoteUpdate = QuoteUpdate.builder()
             .version(0.3)
             .plusActions(actionsBuilder -> actionsBuilder)
             .build()
 
  • Constructor Details

    • QuoteUpdateBuilder

      public QuoteUpdateBuilder()
  • Method Details

    • version

      public QuoteUpdateBuilder version(Long version)

      Expected version of the Quote to which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

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

      public QuoteUpdateBuilder actions(QuoteUpdateAction... actions)

      Update actions to be performed on the Quote.

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

      public QuoteUpdateBuilder actions(List<QuoteUpdateAction> actions)

      Update actions to be performed on the Quote.

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

      public QuoteUpdateBuilder plusActions(QuoteUpdateAction... actions)

      Update actions to be performed on the Quote.

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

      Update actions to be performed on the Quote.

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

      Update actions to be performed on the Quote.

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

      public Long getVersion()

      Expected version of the Quote to which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

      Returns:
      version
    • getActions

      public List<QuoteUpdateAction> getActions()

      Update actions to be performed on the Quote.

      Returns:
      actions
    • build

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

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

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

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