Class ChangeValueGiftLineItemChangeValueBuilder
java.lang.Object
com.commercetools.history.models.change_value.ChangeValueGiftLineItemChangeValueBuilder
- All Implemented Interfaces:
Builder<ChangeValueGiftLineItemChangeValue>
public class ChangeValueGiftLineItemChangeValueBuilder
extends Object
implements Builder<ChangeValueGiftLineItemChangeValue>
ChangeValueGiftLineItemChangeValueBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ChangeValueGiftLineItemChangeValue changeValueGiftLineItemChangeValue = ChangeValueGiftLineItemChangeValue.builder()
.product(productBuilder -> productBuilder)
.variantId(1)
.distributionChannel(distributionChannelBuilder -> distributionChannelBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ChangeValueGiftLineItemChangeValue with checking for non-null required valuesbuilds ChangeValueGiftLineItemChangeValue without checking for non-null required valuesdistributionChannel
(Reference distributionChannel) Channel with ChannelRoleEnumProductDistribution
.Channel with ChannelRoleEnumProductDistribution
.Channel with ChannelRoleEnumProductDistribution
.Reference to a Product.Channel with ChannelRoleEnumInventorySupply
.id
of the ProductVariant.of()
factory method for an instance of ChangeValueGiftLineItemChangeValueBuilderof
(ChangeValueGiftLineItemChangeValue template) create builder for ChangeValueGiftLineItemChangeValue instanceReference to a Product.product
(Function<ReferenceBuilder, ReferenceBuilder> builder) Reference to a Product.supplyChannel
(Reference supplyChannel) Channel with ChannelRoleEnumInventorySupply
.Channel with ChannelRoleEnumInventorySupply
.id
of the ProductVariant.Channel with ChannelRoleEnumProductDistribution
.withProduct
(Function<ReferenceBuilder, Reference> builder) Reference to a Product.withSupplyChannel
(Function<ReferenceBuilder, Reference> builder) Channel with ChannelRoleEnumInventorySupply
.
-
Constructor Details
-
ChangeValueGiftLineItemChangeValueBuilder
public ChangeValueGiftLineItemChangeValueBuilder()
-
-
Method Details
-
product
public ChangeValueGiftLineItemChangeValueBuilder product(Function<ReferenceBuilder, ReferenceBuilder> builder) Reference to a Product.
- Parameters:
builder
- function to build the product value- Returns:
- Builder
-
withProduct
public ChangeValueGiftLineItemChangeValueBuilder withProduct(Function<ReferenceBuilder, Reference> builder) Reference to a Product.
- Parameters:
builder
- function to build the product value- Returns:
- Builder
-
product
Reference to a Product.
- Parameters:
product
- value to be set- Returns:
- Builder
-
variantId
id
of the ProductVariant.- Parameters:
variantId
- value to be set- Returns:
- Builder
-
supplyChannel
public ChangeValueGiftLineItemChangeValueBuilder supplyChannel(Function<ReferenceBuilder, ReferenceBuilder> builder) Channel with ChannelRoleEnum
InventorySupply
.- Parameters:
builder
- function to build the supplyChannel value- Returns:
- Builder
-
withSupplyChannel
public ChangeValueGiftLineItemChangeValueBuilder withSupplyChannel(Function<ReferenceBuilder, Reference> builder) Channel with ChannelRoleEnum
InventorySupply
.- Parameters:
builder
- function to build the supplyChannel value- Returns:
- Builder
-
supplyChannel
Channel with ChannelRoleEnum
InventorySupply
.- Parameters:
supplyChannel
- value to be set- Returns:
- Builder
-
distributionChannel
public ChangeValueGiftLineItemChangeValueBuilder distributionChannel(Function<ReferenceBuilder, ReferenceBuilder> builder) Channel with ChannelRoleEnum
ProductDistribution
.- Parameters:
builder
- function to build the distributionChannel value- Returns:
- Builder
-
withDistributionChannel
public ChangeValueGiftLineItemChangeValueBuilder withDistributionChannel(Function<ReferenceBuilder, Reference> builder) Channel with ChannelRoleEnum
ProductDistribution
.- Parameters:
builder
- function to build the distributionChannel value- Returns:
- Builder
-
distributionChannel
Channel with ChannelRoleEnum
ProductDistribution
.- Parameters:
distributionChannel
- value to be set- Returns:
- Builder
-
getProduct
Reference to a Product.
- Returns:
- product
-
getVariantId
id
of the ProductVariant.- Returns:
- variantId
-
getSupplyChannel
Channel with ChannelRoleEnum
InventorySupply
.- Returns:
- supplyChannel
-
getDistributionChannel
Channel with ChannelRoleEnum
ProductDistribution
.- Returns:
- distributionChannel
-
build
builds ChangeValueGiftLineItemChangeValue with checking for non-null required values- Specified by:
build
in interfaceBuilder<ChangeValueGiftLineItemChangeValue>
- Returns:
- ChangeValueGiftLineItemChangeValue
-
buildUnchecked
builds ChangeValueGiftLineItemChangeValue without checking for non-null required values- Returns:
- ChangeValueGiftLineItemChangeValue
-
of
factory method for an instance of ChangeValueGiftLineItemChangeValueBuilder- Returns:
- builder
-
of
public static ChangeValueGiftLineItemChangeValueBuilder of(ChangeValueGiftLineItemChangeValue template) create builder for ChangeValueGiftLineItemChangeValue instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-