Class MyQuoteUpdateBuilder

java.lang.Object
com.commercetools.api.models.me.MyQuoteUpdateBuilder
All Implemented Interfaces:
Builder<MyQuoteUpdate>

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

     MyQuoteUpdate myQuoteUpdate = MyQuoteUpdate.builder()
             .version(0.3)
             .plusActions(actionsBuilder -> actionsBuilder)
             .build()
 
  • Constructor Details

    • MyQuoteUpdateBuilder

      public MyQuoteUpdateBuilder()
  • Method Details

    • version

      public MyQuoteUpdateBuilder 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 MyQuoteUpdateBuilder actions(MyQuoteUpdateAction... actions)

      Update actions to be performed on the Quote.

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

      public MyQuoteUpdateBuilder actions(List<MyQuoteUpdateAction> actions)

      Update actions to be performed on the Quote.

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

      public MyQuoteUpdateBuilder plusActions(MyQuoteUpdateAction... 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<MyQuoteUpdateAction> getActions()

      Update actions to be performed on the Quote.

      Returns:
      actions
    • build

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

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

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

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