Class LineItemDraftImpl
- All Implemented Interfaces:
LineItemDraft
,CustomizableDraft<LineItemDraft>
,io.vrap.rmf.base.client.Draft<LineItemDraft>
,io.vrap.rmf.base.client.ModelBase
For Product Variant identification, either the productId
and variantId
, or sku
must be provided.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vrap.rmf.base.client.ModelBase
io.vrap.rmf.base.client.ModelBase.FilteredRecursiveToStringStyle
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Date and time (UTC) the Product Variant is added to the Cart.Custom Fields for the Line Item.Used to select a Product Price.Sets the LineItemprice
value, and thepriceMode
toExternalPrice
LineItemPriceMode.External Tax Rate for the Line Item if the Cart has theExternal
TaxMode.Sets the LineItemprice
andtotalPrice
values, and thepriceMode
toExternalTotal
LineItemPriceMode.Inventory mode specific to the Line Item only, and valid for the entirequantity
of the Line Item.getKey()
User-defined unique identifier of the LineItem.id
of a published Product.Quantity of the Product Variant to add to the Cart.Container for Line Item-specific addresses.getSku()
sku
of the ProductVariant.Used to identify Inventory entries that must be reserved.id
of the ProductVariant in the Product.int
hashCode()
void
setAddedAt
(ZonedDateTime addedAt) Date and time (UTC) the Product Variant is added to the Cart.void
setCustom
(CustomFieldsDraft custom) Custom Fields for the Line Item.void
setDistributionChannel
(ChannelResourceIdentifier distributionChannel) Used to select a Product Price.void
setExternalPrice
(Money externalPrice) Sets the LineItemprice
value, and thepriceMode
toExternalPrice
LineItemPriceMode.void
setExternalTaxRate
(ExternalTaxRateDraft externalTaxRate) External Tax Rate for the Line Item if the Cart has theExternal
TaxMode.void
setExternalTotalPrice
(ExternalLineItemTotalPrice externalTotalPrice) Sets the LineItemprice
andtotalPrice
values, and thepriceMode
toExternalTotal
LineItemPriceMode.void
setInventoryMode
(InventoryMode inventoryMode) Inventory mode specific to the Line Item only, and valid for the entirequantity
of the Line Item.void
User-defined unique identifier of the LineItem.void
setProductId
(String productId) id
of a published Product.void
setQuantity
(Long quantity) Quantity of the Product Variant to add to the Cart.void
setShippingDetails
(ItemShippingDetailsDraft shippingDetails) Container for Line Item-specific addresses.void
sku
of the ProductVariant.void
setSupplyChannel
(ChannelResourceIdentifier supplyChannel) Used to identify Inventory entries that must be reserved.void
setVariantId
(Long variantId) id
of the ProductVariant in the Product.Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.commercetools.api.models.CustomizableDraft
unwrapCustomizableDraft
Methods inherited from interface com.commercetools.api.models.cart.LineItemDraft
withLineItemDraft
Methods inherited from interface io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
-
Constructor Details
-
LineItemDraftImpl
public LineItemDraftImpl()create empty instance
-
-
Method Details
-
getKey
User-defined unique identifier of the LineItem.
- Specified by:
getKey
in interfaceLineItemDraft
- Returns:
- key
-
getProductId
id
of a published Product.- Specified by:
getProductId
in interfaceLineItemDraft
- Returns:
- productId
-
getVariantId
id
of the ProductVariant in the Product. If not provided, the Master Variant is used.- Specified by:
getVariantId
in interfaceLineItemDraft
- Returns:
- variantId
-
getSku
sku
of the ProductVariant.- Specified by:
getSku
in interfaceLineItemDraft
- Returns:
- sku
-
getQuantity
Quantity of the Product Variant to add to the Cart.
- Specified by:
getQuantity
in interfaceLineItemDraft
- Returns:
- quantity
-
getAddedAt
Date and time (UTC) the Product Variant is added to the Cart. If not set, it defaults to the current date and time.
Optional for backwards compatibility reasons.
- Specified by:
getAddedAt
in interfaceLineItemDraft
- Returns:
- addedAt
-
getDistributionChannel
Used to select a Product Price. The referenced Channel must have the
ProductDistribution
ChannelRoleEnum.If the Cart is bound to a Store with
distributionChannels
set, the Channel must match one of the Store's distribution channels.- Specified by:
getDistributionChannel
in interfaceLineItemDraft
- Returns:
- distributionChannel
-
getSupplyChannel
Used to identify Inventory entries that must be reserved. The referenced Channel must have the
InventorySupply
ChannelRoleEnum.- Specified by:
getSupplyChannel
in interfaceLineItemDraft
- Returns:
- supplyChannel
-
getExternalPrice
Sets the LineItem
price
value, and thepriceMode
toExternalPrice
LineItemPriceMode.- Specified by:
getExternalPrice
in interfaceLineItemDraft
- Returns:
- externalPrice
-
getExternalTotalPrice
Sets the LineItem
price
andtotalPrice
values, and thepriceMode
toExternalTotal
LineItemPriceMode.- Specified by:
getExternalTotalPrice
in interfaceLineItemDraft
- Returns:
- externalTotalPrice
-
getExternalTaxRate
External Tax Rate for the Line Item if the Cart has the
External
TaxMode.- Specified by:
getExternalTaxRate
in interfaceLineItemDraft
- Returns:
- externalTaxRate
-
getInventoryMode
Inventory mode specific to the Line Item only, and valid for the entire
quantity
of the Line Item. Set only if the inventory mode should be different from theinventoryMode
specified on the Cart.- Specified by:
getInventoryMode
in interfaceLineItemDraft
- Returns:
- inventoryMode
-
getShippingDetails
Container for Line Item-specific addresses.
- Specified by:
getShippingDetails
in interfaceLineItemDraft
- Returns:
- shippingDetails
-
getCustom
Custom Fields for the Line Item.
- Specified by:
getCustom
in interfaceCustomizableDraft<LineItemDraft>
- Specified by:
getCustom
in interfaceLineItemDraft
- Returns:
- custom
-
setKey
Description copied from interface:LineItemDraft
User-defined unique identifier of the LineItem.
- Specified by:
setKey
in interfaceLineItemDraft
- Parameters:
key
- value to be set
-
setProductId
Description copied from interface:LineItemDraft
id
of a published Product.- Specified by:
setProductId
in interfaceLineItemDraft
- Parameters:
productId
- value to be set
-
setVariantId
Description copied from interface:LineItemDraft
id
of the ProductVariant in the Product. If not provided, the Master Variant is used.- Specified by:
setVariantId
in interfaceLineItemDraft
- Parameters:
variantId
- value to be set
-
setSku
Description copied from interface:LineItemDraft
sku
of the ProductVariant.- Specified by:
setSku
in interfaceLineItemDraft
- Parameters:
sku
- value to be set
-
setQuantity
Description copied from interface:LineItemDraft
Quantity of the Product Variant to add to the Cart.
- Specified by:
setQuantity
in interfaceLineItemDraft
- Parameters:
quantity
- value to be set
-
setAddedAt
Description copied from interface:LineItemDraft
Date and time (UTC) the Product Variant is added to the Cart. If not set, it defaults to the current date and time.
Optional for backwards compatibility reasons.
- Specified by:
setAddedAt
in interfaceLineItemDraft
- Parameters:
addedAt
- value to be set
-
setDistributionChannel
Description copied from interface:LineItemDraft
Used to select a Product Price. The referenced Channel must have the
ProductDistribution
ChannelRoleEnum.If the Cart is bound to a Store with
distributionChannels
set, the Channel must match one of the Store's distribution channels.- Specified by:
setDistributionChannel
in interfaceLineItemDraft
- Parameters:
distributionChannel
- value to be set
-
setSupplyChannel
Description copied from interface:LineItemDraft
Used to identify Inventory entries that must be reserved. The referenced Channel must have the
InventorySupply
ChannelRoleEnum.- Specified by:
setSupplyChannel
in interfaceLineItemDraft
- Parameters:
supplyChannel
- value to be set
-
setExternalPrice
Description copied from interface:LineItemDraft
Sets the LineItem
price
value, and thepriceMode
toExternalPrice
LineItemPriceMode.- Specified by:
setExternalPrice
in interfaceLineItemDraft
- Parameters:
externalPrice
- value to be set
-
setExternalTotalPrice
Description copied from interface:LineItemDraft
Sets the LineItem
price
andtotalPrice
values, and thepriceMode
toExternalTotal
LineItemPriceMode.- Specified by:
setExternalTotalPrice
in interfaceLineItemDraft
- Parameters:
externalTotalPrice
- value to be set
-
setExternalTaxRate
Description copied from interface:LineItemDraft
External Tax Rate for the Line Item if the Cart has the
External
TaxMode.- Specified by:
setExternalTaxRate
in interfaceLineItemDraft
- Parameters:
externalTaxRate
- value to be set
-
setInventoryMode
Description copied from interface:LineItemDraft
Inventory mode specific to the Line Item only, and valid for the entire
quantity
of the Line Item. Set only if the inventory mode should be different from theinventoryMode
specified on the Cart.- Specified by:
setInventoryMode
in interfaceLineItemDraft
- Parameters:
inventoryMode
- value to be set
-
setShippingDetails
Description copied from interface:LineItemDraft
Container for Line Item-specific addresses.
- Specified by:
setShippingDetails
in interfaceLineItemDraft
- Parameters:
shippingDetails
- value to be set
-
setCustom
Description copied from interface:LineItemDraft
Custom Fields for the Line Item.
- Specified by:
setCustom
in interfaceCustomizableDraft<LineItemDraft>
- Specified by:
setCustom
in interfaceLineItemDraft
- Parameters:
custom
- value to be set
-
equals
-
hashCode
-