Class CartDiscountSetDiscountGroupActionBuilder
- All Implemented Interfaces:
Builder<CartDiscountSetDiscountGroupAction>
Example to create an instance using the builder pattern
CartDiscountSetDiscountGroupAction cartDiscountSetDiscountGroupAction = CartDiscountSetDiscountGroupAction.builder()
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CartDiscountSetDiscountGroupAction with checking for non-null required valuesbuilds CartDiscountSetDiscountGroupAction without checking for non-null required valuesdiscountGroup
(DiscountGroupResourceIdentifier discountGroup) Reference to a DiscountGroup that the Cart Discount must belong to.discountGroup
(Function<DiscountGroupResourceIdentifierBuilder, DiscountGroupResourceIdentifierBuilder> builder) Reference to a DiscountGroup that the Cart Discount must belong to.Reference to a DiscountGroup that the Cart Discount must belong to.New value to set (between0
and1
) that determines the order in which the CartDiscounts are applied; a CartDiscount with a higher value is prioritized.of()
factory method for an instance of CartDiscountSetDiscountGroupActionBuilderof
(CartDiscountSetDiscountGroupAction template) create builder for CartDiscountSetDiscountGroupAction instanceNew value to set (between0
and1
) that determines the order in which the CartDiscounts are applied; a CartDiscount with a higher value is prioritized.withDiscountGroup
(Function<DiscountGroupResourceIdentifierBuilder, DiscountGroupResourceIdentifier> builder) Reference to a DiscountGroup that the Cart Discount must belong to.
-
Constructor Details
-
CartDiscountSetDiscountGroupActionBuilder
public CartDiscountSetDiscountGroupActionBuilder()
-
-
Method Details
-
discountGroup
public CartDiscountSetDiscountGroupActionBuilder discountGroup(Function<DiscountGroupResourceIdentifierBuilder, DiscountGroupResourceIdentifierBuilder> builder) Reference to a DiscountGroup that the Cart Discount must belong to. If empty, any existing value will be removed.
- Parameters:
builder
- function to build the discountGroup value- Returns:
- Builder
-
withDiscountGroup
public CartDiscountSetDiscountGroupActionBuilder withDiscountGroup(Function<DiscountGroupResourceIdentifierBuilder, DiscountGroupResourceIdentifier> builder) Reference to a DiscountGroup that the Cart Discount must belong to. If empty, any existing value will be removed.
- Parameters:
builder
- function to build the discountGroup value- Returns:
- Builder
-
discountGroup
public CartDiscountSetDiscountGroupActionBuilder discountGroup(@Nullable DiscountGroupResourceIdentifier discountGroup) Reference to a DiscountGroup that the Cart Discount must belong to. If empty, any existing value will be removed.
- Parameters:
discountGroup
- value to be set- Returns:
- Builder
-
sortOrder
New value to set (between
0
and1
) that determines the order in which the CartDiscounts are applied; a CartDiscount with a higher value is prioritized.Required if
discountGroup
is absent. IfdiscountGroup
is set, the CartDiscount will use the sort order of the DiscountGroup.- Parameters:
sortOrder
- value to be set- Returns:
- Builder
-
getDiscountGroup
Reference to a DiscountGroup that the Cart Discount must belong to. If empty, any existing value will be removed.
- Returns:
- discountGroup
-
getSortOrder
New value to set (between
0
and1
) that determines the order in which the CartDiscounts are applied; a CartDiscount with a higher value is prioritized.Required if
discountGroup
is absent. IfdiscountGroup
is set, the CartDiscount will use the sort order of the DiscountGroup.- Returns:
- sortOrder
-
build
builds CartDiscountSetDiscountGroupAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<CartDiscountSetDiscountGroupAction>
- Returns:
- CartDiscountSetDiscountGroupAction
-
buildUnchecked
builds CartDiscountSetDiscountGroupAction without checking for non-null required values- Returns:
- CartDiscountSetDiscountGroupAction
-
of
factory method for an instance of CartDiscountSetDiscountGroupActionBuilder- Returns:
- builder
-
of
public static CartDiscountSetDiscountGroupActionBuilder of(CartDiscountSetDiscountGroupAction template) create builder for CartDiscountSetDiscountGroupAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-