Class PaymentUpdateBuilder

java.lang.Object
com.commercetools.api.models.payment.PaymentUpdateBuilder
All Implemented Interfaces:
Builder<PaymentUpdate>

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

     PaymentUpdate paymentUpdate = PaymentUpdate.builder()
             .version(0.3)
             .plusActions(actionsBuilder -> actionsBuilder)
             .build()
 
  • Constructor Details

    • PaymentUpdateBuilder

      public PaymentUpdateBuilder()
  • Method Details

    • version

      public PaymentUpdateBuilder 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 PaymentUpdateBuilder actions(PaymentUpdateAction... actions)

      Update actions to be performed on the Payment.

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

      public PaymentUpdateBuilder actions(List<PaymentUpdateAction> actions)

      Update actions to be performed on the Payment.

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

      public PaymentUpdateBuilder plusActions(PaymentUpdateAction... 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<PaymentUpdateAction> getActions()

      Update actions to be performed on the Payment.

      Returns:
      actions
    • build

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

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

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

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