Class CartDiscountValueGiftLineItemBuilder
- All Implemented Interfaces:
Builder<CartDiscountValueGiftLineItem>
Example to create an instance using the builder pattern
CartDiscountValueGiftLineItem cartDiscountValueGiftLineItem = CartDiscountValueGiftLineItem.builder()
.product(productBuilder -> productBuilder)
.variantId(0.3)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds CartDiscountValueGiftLineItem with checking for non-null required valuesbuilds CartDiscountValueGiftLineItem without checking for non-null required valuesdistributionChannel(ChannelReference distributionChannel) Channel must have the ChannelRoleEnumProductDistribution.Channel must have the ChannelRoleEnumProductDistribution.Channel must have the ChannelRoleEnumProductDistribution.Reference to a Product.Channel must have the ChannelRoleEnumInventorySupply.ProductVariant of the Product.of()factory method for an instance of CartDiscountValueGiftLineItemBuilderof(CartDiscountValueGiftLineItem template) create builder for CartDiscountValueGiftLineItem instanceproduct(ProductReference product) Reference to a Product.Reference to a Product.supplyChannel(ChannelReference supplyChannel) Channel must have the ChannelRoleEnumInventorySupply.Channel must have the ChannelRoleEnumInventorySupply.ProductVariant of the Product.Channel must have the ChannelRoleEnumProductDistribution.Reference to a Product.Channel must have the ChannelRoleEnumInventorySupply.
-
Constructor Details
-
CartDiscountValueGiftLineItemBuilder
public CartDiscountValueGiftLineItemBuilder()
-
-
Method Details
-
product
public CartDiscountValueGiftLineItemBuilder product(Function<ProductReferenceBuilder, ProductReferenceBuilder> builder) Reference to a Product.
A Gift Line Item can be present on a Cart even if the referenced Product is unpublished.
- Parameters:
builder- function to build the product value- Returns:
- Builder
-
withProduct
public CartDiscountValueGiftLineItemBuilder withProduct(Function<ProductReferenceBuilder, ProductReference> builder) Reference to a Product.
A Gift Line Item can be present on a Cart even if the referenced Product is unpublished.
- Parameters:
builder- function to build the product value- Returns:
- Builder
-
product
Reference to a Product.
A Gift Line Item can be present on a Cart even if the referenced Product is unpublished.
- Parameters:
product- value to be set- Returns:
- Builder
-
variantId
ProductVariant of the Product.
- Parameters:
variantId- value to be set- Returns:
- Builder
-
supplyChannel
public CartDiscountValueGiftLineItemBuilder supplyChannel(Function<ChannelReferenceBuilder, ChannelReferenceBuilder> builder) Channel must have the ChannelRoleEnum
InventorySupply.- Parameters:
builder- function to build the supplyChannel value- Returns:
- Builder
-
withSupplyChannel
public CartDiscountValueGiftLineItemBuilder withSupplyChannel(Function<ChannelReferenceBuilder, ChannelReference> builder) Channel must have the ChannelRoleEnum
InventorySupply.- Parameters:
builder- function to build the supplyChannel value- Returns:
- Builder
-
supplyChannel
Channel must have the ChannelRoleEnum
InventorySupply.- Parameters:
supplyChannel- value to be set- Returns:
- Builder
-
distributionChannel
public CartDiscountValueGiftLineItemBuilder distributionChannel(Function<ChannelReferenceBuilder, ChannelReferenceBuilder> builder) Channel must have the ChannelRoleEnum
ProductDistribution.- Parameters:
builder- function to build the distributionChannel value- Returns:
- Builder
-
withDistributionChannel
public CartDiscountValueGiftLineItemBuilder withDistributionChannel(Function<ChannelReferenceBuilder, ChannelReference> builder) Channel must have the ChannelRoleEnum
ProductDistribution.- Parameters:
builder- function to build the distributionChannel value- Returns:
- Builder
-
distributionChannel
public CartDiscountValueGiftLineItemBuilder distributionChannel(@Nullable ChannelReference distributionChannel) Channel must have the ChannelRoleEnum
ProductDistribution.- Parameters:
distributionChannel- value to be set- Returns:
- Builder
-
getProduct
Reference to a Product.
A Gift Line Item can be present on a Cart even if the referenced Product is unpublished.
- Returns:
- product
-
getVariantId
ProductVariant of the Product.
- Returns:
- variantId
-
getSupplyChannel
Channel must have the ChannelRoleEnum
InventorySupply.- Returns:
- supplyChannel
-
getDistributionChannel
Channel must have the ChannelRoleEnum
ProductDistribution.- Returns:
- distributionChannel
-
build
builds CartDiscountValueGiftLineItem with checking for non-null required values- Specified by:
buildin interfaceBuilder<CartDiscountValueGiftLineItem>- Returns:
- CartDiscountValueGiftLineItem
-
buildUnchecked
builds CartDiscountValueGiftLineItem without checking for non-null required values- Returns:
- CartDiscountValueGiftLineItem
-
of
factory method for an instance of CartDiscountValueGiftLineItemBuilder- Returns:
- builder
-
of
create builder for CartDiscountValueGiftLineItem instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-