Class SubscriptionUpdateBuilder
java.lang.Object
com.commercetools.api.models.subscription.SubscriptionUpdateBuilder
- All Implemented Interfaces:
Builder<SubscriptionUpdate>
SubscriptionUpdateBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
SubscriptionUpdate subscriptionUpdate = SubscriptionUpdate.builder()
.version(0.3)
.plusActions(actionsBuilder -> actionsBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionactions
(SubscriptionUpdateAction... actions) Update actions to be performed on the Subscription.actions
(List<SubscriptionUpdateAction> actions) Update actions to be performed on the Subscription.build()
builds SubscriptionUpdate with checking for non-null required valuesbuilds SubscriptionUpdate without checking for non-null required valuesUpdate actions to be performed on the Subscription.Expected version of the Subscription on which the changes should be applied.static SubscriptionUpdateBuilder
of()
factory method for an instance of SubscriptionUpdateBuilderstatic SubscriptionUpdateBuilder
of
(SubscriptionUpdate template) create builder for SubscriptionUpdate instanceplusActions
(SubscriptionUpdateAction... actions) Update actions to be performed on the Subscription.plusActions
(Function<SubscriptionUpdateActionBuilder, Builder<? extends SubscriptionUpdateAction>> builder) Update actions to be performed on the Subscription.Expected version of the Subscription on which the changes should be applied.withActions
(Function<SubscriptionUpdateActionBuilder, Builder<? extends SubscriptionUpdateAction>> builder) Update actions to be performed on the Subscription.
-
Constructor Details
-
SubscriptionUpdateBuilder
public SubscriptionUpdateBuilder()
-
-
Method Details
-
version
Expected version of the Subscription 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
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
Update actions to be performed on the Subscription.
- Parameters:
actions
- value to be set- Returns:
- Builder
-
plusActions
public SubscriptionUpdateBuilder plusActions(Function<SubscriptionUpdateActionBuilder, 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, Builder<? extends SubscriptionUpdateAction>> builder) Update actions to be performed on the Subscription.
- Parameters:
builder
- function to build the actions value- Returns:
- Builder
-
getVersion
Expected version of the Subscription 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
Update actions to be performed on the Subscription.
- Returns:
- actions
-
build
builds SubscriptionUpdate with checking for non-null required values- Specified by:
build
in interfaceBuilder<SubscriptionUpdate>
- Returns:
- SubscriptionUpdate
-
buildUnchecked
builds SubscriptionUpdate without checking for non-null required values- Returns:
- SubscriptionUpdate
-
of
factory method for an instance of SubscriptionUpdateBuilder- Returns:
- builder
-
of
create builder for SubscriptionUpdate instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-