Class MyLineItemDraftImpl
- All Implemented Interfaces:
CustomizableDraft<MyLineItemDraft>
,MyLineItemDraft
,io.vrap.rmf.base.client.Draft<MyLineItemDraft>
,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 Cart.Used to select a Product Price.getKey()
User-defined unique identifier of the LineItem.id
of the Product.Number of Product Variants 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 Cart.void
setDistributionChannel
(ChannelResourceIdentifier distributionChannel) Used to select a Product Price.void
User-defined unique identifier of the LineItem.void
setProductId
(String productId) id
of the Product.void
setQuantity
(Long quantity) Number of Product Variants 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 io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
Methods inherited from interface com.commercetools.api.models.me.MyLineItemDraft
withMyLineItemDraft
-
Constructor Details
-
MyLineItemDraftImpl
public MyLineItemDraftImpl()create empty instance
-
-
Method Details
-
getKey
User-defined unique identifier of the LineItem.
- Specified by:
getKey
in interfaceMyLineItemDraft
- Returns:
- key
-
getProductId
id
of the Product.- Specified by:
getProductId
in interfaceMyLineItemDraft
- Returns:
- productId
-
getVariantId
id
of the ProductVariant in the Product. If not provided, the Master Variant is used.- Specified by:
getVariantId
in interfaceMyLineItemDraft
- Returns:
- variantId
-
getSku
sku
of the ProductVariant.- Specified by:
getSku
in interfaceMyLineItemDraft
- Returns:
- sku
-
getQuantity
Number of Product Variants to add to the Cart.
- Specified by:
getQuantity
in interfaceMyLineItemDraft
- 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 interfaceMyLineItemDraft
- Returns:
- addedAt
-
getSupplyChannel
Used to identify Inventory entries that must be reserved. The Channel must have the
InventorySupply
ChannelRoleEnum.- Specified by:
getSupplyChannel
in interfaceMyLineItemDraft
- Returns:
- supplyChannel
-
getDistributionChannel
Used to select a Product Price. The 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 interfaceMyLineItemDraft
- Returns:
- distributionChannel
-
getShippingDetails
Container for Line Item-specific addresses.
- Specified by:
getShippingDetails
in interfaceMyLineItemDraft
- Returns:
- shippingDetails
-
getCustom
Custom Fields for the Cart.
- Specified by:
getCustom
in interfaceCustomizableDraft<MyLineItemDraft>
- Specified by:
getCustom
in interfaceMyLineItemDraft
- Returns:
- custom
-
setKey
Description copied from interface:MyLineItemDraft
User-defined unique identifier of the LineItem.
- Specified by:
setKey
in interfaceMyLineItemDraft
- Parameters:
key
- value to be set
-
setProductId
Description copied from interface:MyLineItemDraft
id
of the Product.- Specified by:
setProductId
in interfaceMyLineItemDraft
- Parameters:
productId
- value to be set
-
setVariantId
Description copied from interface:MyLineItemDraft
id
of the ProductVariant in the Product. If not provided, the Master Variant is used.- Specified by:
setVariantId
in interfaceMyLineItemDraft
- Parameters:
variantId
- value to be set
-
setSku
Description copied from interface:MyLineItemDraft
sku
of the ProductVariant.- Specified by:
setSku
in interfaceMyLineItemDraft
- Parameters:
sku
- value to be set
-
setQuantity
Description copied from interface:MyLineItemDraft
Number of Product Variants to add to the Cart.
- Specified by:
setQuantity
in interfaceMyLineItemDraft
- Parameters:
quantity
- value to be set
-
setAddedAt
Description copied from interface:MyLineItemDraft
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 interfaceMyLineItemDraft
- Parameters:
addedAt
- value to be set
-
setSupplyChannel
Description copied from interface:MyLineItemDraft
Used to identify Inventory entries that must be reserved. The Channel must have the
InventorySupply
ChannelRoleEnum.- Specified by:
setSupplyChannel
in interfaceMyLineItemDraft
- Parameters:
supplyChannel
- value to be set
-
setDistributionChannel
Description copied from interface:MyLineItemDraft
Used to select a Product Price. The 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 interfaceMyLineItemDraft
- Parameters:
distributionChannel
- value to be set
-
setShippingDetails
Description copied from interface:MyLineItemDraft
Container for Line Item-specific addresses.
- Specified by:
setShippingDetails
in interfaceMyLineItemDraft
- Parameters:
shippingDetails
- value to be set
-
setCustom
Description copied from interface:MyLineItemDraft
Custom Fields for the Cart.
- Specified by:
setCustom
in interfaceCustomizableDraft<MyLineItemDraft>
- Specified by:
setCustom
in interfaceMyLineItemDraft
- Parameters:
custom
- value to be set
-
equals
-
hashCode
public int hashCode()
-