Interface CartDiscountValueGiftLineItem
- All Superinterfaces:
CartDiscountValue
,CartDiscountValueGiftLineItemMixin
,CartDiscountValueMixin
,GenericCartDiscountValueMixin<CartDiscountValueGiftLineItemDraft>
- All Known Implementing Classes:
CartDiscountValueGiftLineItemImpl
public interface CartDiscountValueGiftLineItem
extends CartDiscountValue, CartDiscountValueGiftLineItemMixin
CartDiscountValueGiftLineItem
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CartDiscountValueGiftLineItem cartDiscountValueGiftLineItem = CartDiscountValueGiftLineItem.builder()
.product(productBuilder -> productBuilder)
.variantId(0.3)
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for CartDiscountValueGiftLineItem -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for CartDiscountValueGiftLineItembuilder
(CartDiscountValueGiftLineItem template) create builder for CartDiscountValueGiftLineItem instancedeepCopy
(CartDiscountValueGiftLineItem template) factory method to create a deep copy of CartDiscountValueGiftLineItem@Valid ChannelReference
Channel must have the ChannelRoleEnumProductDistribution
.@NotNull @Valid ProductReference
Reference to a Product.@Valid ChannelReference
Channel must have the ChannelRoleEnumInventorySupply
.@NotNull Long
ProductVariant of the Product.of()
factory methodof
(CartDiscountValueGiftLineItem template) factory method to create a shallow copy CartDiscountValueGiftLineItemvoid
setDistributionChannel
(ChannelReference distributionChannel) Channel must have the ChannelRoleEnumProductDistribution
.void
setProduct
(ProductReference product) Reference to a Product.void
setSupplyChannel
(ChannelReference supplyChannel) Channel must have the ChannelRoleEnumInventorySupply
.void
setVariantId
(Long variantId) ProductVariant of the Product.static com.fasterxml.jackson.core.type.TypeReference<CartDiscountValueGiftLineItem>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.cart_discount.CartDiscountValue
getType, withCartDiscountValue
Methods inherited from interface com.commercetools.api.models.cart_discount.CartDiscountValueGiftLineItemMixin
toDraft, toDraftBuilder
-
Field Details
-
GIFT_LINE_ITEM
discriminator value for CartDiscountValueGiftLineItem- See Also:
-
-
Method Details
-
getProduct
Reference to a Product.
- Specified by:
getProduct
in interfaceCartDiscountValueGiftLineItemMixin
- Returns:
- product
-
getVariantId
ProductVariant of the Product.
- Specified by:
getVariantId
in interfaceCartDiscountValueGiftLineItemMixin
- Returns:
- variantId
-
getSupplyChannel
Channel must have the ChannelRoleEnum
InventorySupply
.- Specified by:
getSupplyChannel
in interfaceCartDiscountValueGiftLineItemMixin
- Returns:
- supplyChannel
-
getDistributionChannel
Channel must have the ChannelRoleEnum
ProductDistribution
.- Specified by:
getDistributionChannel
in interfaceCartDiscountValueGiftLineItemMixin
- Returns:
- distributionChannel
-
setProduct
Reference to a Product.
- Parameters:
product
- value to be set
-
setVariantId
ProductVariant of the Product.
- Parameters:
variantId
- value to be set
-
setSupplyChannel
Channel must have the ChannelRoleEnum
InventorySupply
.- Parameters:
supplyChannel
- value to be set
-
setDistributionChannel
Channel must have the ChannelRoleEnum
ProductDistribution
.- Parameters:
distributionChannel
- value to be set
-
of
factory method- Returns:
- instance of CartDiscountValueGiftLineItem
-
of
factory method to create a shallow copy CartDiscountValueGiftLineItem- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static CartDiscountValueGiftLineItem deepCopy(@Nullable CartDiscountValueGiftLineItem template) factory method to create a deep copy of CartDiscountValueGiftLineItem- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CartDiscountValueGiftLineItem- Returns:
- builder
-
builder
create builder for CartDiscountValueGiftLineItem instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withCartDiscountValueGiftLineItem
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-