Class SubscriptionUpdateBuilder

java.lang.Object
com.commercetools.api.models.subscription.SubscriptionUpdateBuilder
All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<SubscriptionUpdate>

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

     SubscriptionUpdate subscriptionUpdate = SubscriptionUpdate.builder()
             .version(0.3)
             .plusActions(actionsBuilder -> actionsBuilder)
             .build()
 
  • Constructor Details

    • SubscriptionUpdateBuilder

      public SubscriptionUpdateBuilder()
  • Method Details

    • version

      public SubscriptionUpdateBuilder version(Long version)

      Expected version of the Subscription on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.

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

      Update actions to be performed on the Subscription.

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

      Update actions to be performed on the Subscription.

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

      public SubscriptionUpdateBuilder plusActions(SubscriptionUpdateAction... actions)

      Update actions to be performed on the Subscription.

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

      public SubscriptionUpdateBuilder plusActions(Function<SubscriptionUpdateActionBuilder,io.vrap.rmf.base.client.Builder<? extends SubscriptionUpdateAction>> builder)

      Update actions to be performed on the Subscription.

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

      public SubscriptionUpdateBuilder withActions(Function<SubscriptionUpdateActionBuilder,io.vrap.rmf.base.client.Builder<? extends SubscriptionUpdateAction>> builder)

      Update actions to be performed on the Subscription.

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

      public Long getVersion()

      Expected version of the Subscription on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.

      Returns:
      version
    • getActions

      public List<SubscriptionUpdateAction> getActions()

      Update actions to be performed on the Subscription.

      Returns:
      actions
    • build

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

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

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

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