Class ShoppingListAddLineItemActionImpl
- All Implemented Interfaces:
CustomizableDraft<ShoppingListAddLineItemAction>
,ResourceUpdateAction<ShoppingListUpdateAction>
,ShoppingListAddLineItemAction
,ShoppingListUpdateAction
,io.vrap.rmf.base.client.ModelBase
The ProductVariant to be included in the ShoppingListLineItem must be specified using the productID
and variantID
, or by the sku
. If the ShoppingList already contains a ShoppingListLineItem for the same Product Variant with the same Custom Fields, then only the quantity of the existing ShoppingListLineItem is increased. A ShoppingListLineItem with an empty variantId
is not considered the same as a ShoppingListLineItem with a variantId
currently referring to the Master Variant.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vrap.rmf.base.client.ModelBase
io.vrap.rmf.base.client.ModelBase.FilteredRecursiveToStringStyle
-
Field Summary
Fields inherited from interface com.commercetools.api.models.shopping_list.ShoppingListAddLineItemAction
ADD_LINE_ITEM
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Date and time the TextLineItem is added to the ShoppingList.Custom Fields defined for the ShoppingListLineItem.Unique identifier of a Product.Number of Products in the ShoppingListLineItem.getSku()
sku
of the ProductVariant.id
of the ProductVariant.int
hashCode()
void
setAddedAt
(ZonedDateTime addedAt) Date and time the TextLineItem is added to the ShoppingList.void
setCustom
(CustomFieldsDraft custom) Custom Fields defined for the ShoppingListLineItem.void
setProductId
(String productId) Unique identifier of a Product.void
setQuantity
(Long quantity) Number of Products in the ShoppingListLineItem.void
sku
of the ProductVariant.void
setVariantId
(Long variantId) id
of the ProductVariant.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.ResourceUpdateAction
get
Methods inherited from interface com.commercetools.api.models.shopping_list.ShoppingListAddLineItemAction
withShoppingListAddLineItemAction
Methods inherited from interface com.commercetools.api.models.shopping_list.ShoppingListUpdateAction
withShoppingListUpdateAction
-
Constructor Details
-
ShoppingListAddLineItemActionImpl
public ShoppingListAddLineItemActionImpl()create empty instance
-
-
Method Details
-
getAction
- Specified by:
getAction
in interfaceResourceUpdateAction<ShoppingListUpdateAction>
- Specified by:
getAction
in interfaceShoppingListUpdateAction
- Returns:
- action
-
getSku
sku
of the ProductVariant.- Specified by:
getSku
in interfaceShoppingListAddLineItemAction
- Returns:
- sku
-
getProductId
Unique identifier of a Product.
- Specified by:
getProductId
in interfaceShoppingListAddLineItemAction
- Returns:
- productId
-
getVariantId
id
of the ProductVariant. If not set, the ShoppingListLineItem refers to the Master Variant.- Specified by:
getVariantId
in interfaceShoppingListAddLineItemAction
- Returns:
- variantId
-
getQuantity
Number of Products in the ShoppingListLineItem.
- Specified by:
getQuantity
in interfaceShoppingListAddLineItemAction
- Returns:
- quantity
-
getAddedAt
Date and time the TextLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.
- Specified by:
getAddedAt
in interfaceShoppingListAddLineItemAction
- Returns:
- addedAt
-
getCustom
Custom Fields defined for the ShoppingListLineItem.
- Specified by:
getCustom
in interfaceCustomizableDraft<ShoppingListAddLineItemAction>
- Specified by:
getCustom
in interfaceShoppingListAddLineItemAction
- Returns:
- custom
-
setSku
Description copied from interface:ShoppingListAddLineItemAction
sku
of the ProductVariant.- Specified by:
setSku
in interfaceShoppingListAddLineItemAction
- Parameters:
sku
- value to be set
-
setProductId
Description copied from interface:ShoppingListAddLineItemAction
Unique identifier of a Product.
- Specified by:
setProductId
in interfaceShoppingListAddLineItemAction
- Parameters:
productId
- value to be set
-
setVariantId
Description copied from interface:ShoppingListAddLineItemAction
id
of the ProductVariant. If not set, the ShoppingListLineItem refers to the Master Variant.- Specified by:
setVariantId
in interfaceShoppingListAddLineItemAction
- Parameters:
variantId
- value to be set
-
setQuantity
Description copied from interface:ShoppingListAddLineItemAction
Number of Products in the ShoppingListLineItem.
- Specified by:
setQuantity
in interfaceShoppingListAddLineItemAction
- Parameters:
quantity
- value to be set
-
setAddedAt
Description copied from interface:ShoppingListAddLineItemAction
Date and time the TextLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.
- Specified by:
setAddedAt
in interfaceShoppingListAddLineItemAction
- Parameters:
addedAt
- value to be set
-
setCustom
Description copied from interface:ShoppingListAddLineItemAction
Custom Fields defined for the ShoppingListLineItem.
- Specified by:
setCustom
in interfaceCustomizableDraft<ShoppingListAddLineItemAction>
- Specified by:
setCustom
in interfaceShoppingListAddLineItemAction
- Parameters:
custom
- value to be set
-
equals
-
hashCode
-