Class ProductSetDiscountedPriceActionBuilder
- All Implemented Interfaces:
Builder<ProductSetDiscountedPriceAction>
Example to create an instance using the builder pattern
ProductSetDiscountedPriceAction productSetDiscountedPriceAction = ProductSetDiscountedPriceAction.builder()
.priceId("{priceId}")
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds ProductSetDiscountedPriceAction with checking for non-null required valuesbuilds ProductSetDiscountedPriceAction without checking for non-null required valuesdiscounted(DiscountedPriceDraft discounted) Value to set.Value to set.Value to set.Theidof the Price to set the Discount.Iftrue, only the staged Embedded Price is updated.of()factory method for an instance of ProductSetDiscountedPriceActionBuilderof(ProductSetDiscountedPriceAction template) create builder for ProductSetDiscountedPriceAction instanceTheidof the Price to set the Discount.Iftrue, only the staged Embedded Price is updated.Value to set.
-
Constructor Details
-
ProductSetDiscountedPriceActionBuilder
public ProductSetDiscountedPriceActionBuilder()
-
-
Method Details
-
priceId
The
idof the Price to set the Discount.- Parameters:
priceId- value to be set- Returns:
- Builder
-
staged
If
true, only the staged Embedded Price is updated. Iffalse, both the current and staged Embedded Price are updated.- Parameters:
staged- value to be set- Returns:
- Builder
-
discounted
public ProductSetDiscountedPriceActionBuilder discounted(Function<DiscountedPriceDraftBuilder, DiscountedPriceDraftBuilder> builder) Value to set. If empty, any existing value will be removed. The referenced ProductDiscount must have the Type
external, be active, and its predicate must match the referenced Price.- Parameters:
builder- function to build the discounted value- Returns:
- Builder
-
withDiscounted
public ProductSetDiscountedPriceActionBuilder withDiscounted(Function<DiscountedPriceDraftBuilder, DiscountedPriceDraft> builder) Value to set. If empty, any existing value will be removed. The referenced ProductDiscount must have the Type
external, be active, and its predicate must match the referenced Price.- Parameters:
builder- function to build the discounted value- Returns:
- Builder
-
discounted
Value to set. If empty, any existing value will be removed. The referenced ProductDiscount must have the Type
external, be active, and its predicate must match the referenced Price.- Parameters:
discounted- value to be set- Returns:
- Builder
-
getPriceId
The
idof the Price to set the Discount.- Returns:
- priceId
-
getStaged
If
true, only the staged Embedded Price is updated. Iffalse, both the current and staged Embedded Price are updated.- Returns:
- staged
-
getDiscounted
Value to set. If empty, any existing value will be removed. The referenced ProductDiscount must have the Type
external, be active, and its predicate must match the referenced Price.- Returns:
- discounted
-
build
builds ProductSetDiscountedPriceAction with checking for non-null required values- Specified by:
buildin interfaceBuilder<ProductSetDiscountedPriceAction>- Returns:
- ProductSetDiscountedPriceAction
-
buildUnchecked
builds ProductSetDiscountedPriceAction without checking for non-null required values- Returns:
- ProductSetDiscountedPriceAction
-
of
factory method for an instance of ProductSetDiscountedPriceActionBuilder- Returns:
- builder
-
of
create builder for ProductSetDiscountedPriceAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-