Class StandalonePriceSetDiscountedPriceActionBuilder
java.lang.Object
com.commercetools.api.models.standalone_price.StandalonePriceSetDiscountedPriceActionBuilder
- All Implemented Interfaces:
Builder<StandalonePriceSetDiscountedPriceAction>
public class StandalonePriceSetDiscountedPriceActionBuilder
extends Object
implements Builder<StandalonePriceSetDiscountedPriceAction>
StandalonePriceSetDiscountedPriceActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
StandalonePriceSetDiscountedPriceAction standalonePriceSetDiscountedPriceAction = StandalonePriceSetDiscountedPriceAction.builder()
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds StandalonePriceSetDiscountedPriceAction with checking for non-null required valuesbuilds StandalonePriceSetDiscountedPriceAction without checking for non-null required valuesdiscounted
(DiscountedPriceDraft discounted) Value to set.Value to set.Value to set.of()
factory method for an instance of StandalonePriceSetDiscountedPriceActionBuilderof
(StandalonePriceSetDiscountedPriceAction template) create builder for StandalonePriceSetDiscountedPriceAction instanceValue to set.
-
Constructor Details
-
StandalonePriceSetDiscountedPriceActionBuilder
public StandalonePriceSetDiscountedPriceActionBuilder()
-
-
Method Details
-
discounted
public StandalonePriceSetDiscountedPriceActionBuilder discounted(Function<DiscountedPriceDraftBuilder, DiscountedPriceDraftBuilder> builder) Value to set. If empty, any existing value will be removed.
The referenced ProductDiscount must be of type external, active, and its predicate must match the referenced Price.
- Parameters:
builder
- function to build the discounted value- Returns:
- Builder
-
withDiscounted
public StandalonePriceSetDiscountedPriceActionBuilder withDiscounted(Function<DiscountedPriceDraftBuilder, DiscountedPriceDraft> builder) Value to set. If empty, any existing value will be removed.
The referenced ProductDiscount must be of type external, active, and its predicate must match the referenced Price.
- Parameters:
builder
- function to build the discounted value- Returns:
- Builder
-
discounted
public StandalonePriceSetDiscountedPriceActionBuilder discounted(@Nullable DiscountedPriceDraft discounted) Value to set. If empty, any existing value will be removed.
The referenced ProductDiscount must be of type external, active, and its predicate must match the referenced Price.
- Parameters:
discounted
- value to be set- Returns:
- Builder
-
getDiscounted
Value to set. If empty, any existing value will be removed.
The referenced ProductDiscount must be of type external, active, and its predicate must match the referenced Price.
- Returns:
- discounted
-
build
builds StandalonePriceSetDiscountedPriceAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<StandalonePriceSetDiscountedPriceAction>
- Returns:
- StandalonePriceSetDiscountedPriceAction
-
buildUnchecked
builds StandalonePriceSetDiscountedPriceAction without checking for non-null required values- Returns:
- StandalonePriceSetDiscountedPriceAction
-
of
factory method for an instance of StandalonePriceSetDiscountedPriceActionBuilder- Returns:
- builder
-
of
public static StandalonePriceSetDiscountedPriceActionBuilder of(StandalonePriceSetDiscountedPriceAction template) create builder for StandalonePriceSetDiscountedPriceAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-