Class MyPaymentUpdateBuilder

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

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

     MyPaymentUpdate myPaymentUpdate = MyPaymentUpdate.builder()
             .version(0.3)
             .plusActions(actionsBuilder -> actionsBuilder)
             .build()
 
  • Constructor Details

    • MyPaymentUpdateBuilder

      public MyPaymentUpdateBuilder()
  • Method Details

    • version

      public MyPaymentUpdateBuilder version(Long version)

      Expected version of the Payment on 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 MyPaymentUpdateBuilder actions(MyPaymentUpdateAction... actions)

      Update actions to be performed on the Payment.

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

      Update actions to be performed on the Payment.

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

      public MyPaymentUpdateBuilder plusActions(MyPaymentUpdateAction... actions)

      Update actions to be performed on the Payment.

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

      Update actions to be performed on the Payment.

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

      Update actions to be performed on the Payment.

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

      public Long getVersion()

      Expected version of the Payment on 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<MyPaymentUpdateAction> getActions()

      Update actions to be performed on the Payment.

      Returns:
      actions
    • build

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

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

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

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