Class ShoppingListLineItemImpl
- All Implemented Interfaces:
Customizable<ShoppingListLineItem>
,ShoppingListLineItem
,io.vrap.rmf.base.client.ModelBase
ShoppingListLineItems are Line Items that contain references to ProductVariants in a Product.
In addition to standard Reference Expansion, a ShoppingListLineItem offers expansion on productSlug
and variant
, defined with the query parameter expand
.
-
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 ShoppingListLineItem was added to the ShoppingList.Custom Fields of the ShoppingListLineItem.If the Product or Product Variant is deleted,deactivatedAt
is the date and time (UTC) of deletion.getId()
Unique identifier of the ShoppingListLineItem.getKey()
User-defined identifier of the ShoppingListLineItem.getName()
Name of the Product.Unique identifier of a Product.Slug of the current ProductData.The Product Type defining the Attributes of the Product.Number of Products in the ShoppingListLineItem.Data of the ProductVariant.id
of the ProductVariant the ShoppingListLineItem refers to.int
hashCode()
void
setAddedAt
(ZonedDateTime addedAt) Date and time (UTC) the ShoppingListLineItem was added to the ShoppingList.void
setCustom
(CustomFields custom) Custom Fields of the ShoppingListLineItem.void
setDeactivatedAt
(ZonedDateTime deactivatedAt) If the Product or Product Variant is deleted,deactivatedAt
is the date and time (UTC) of deletion.void
Unique identifier of the ShoppingListLineItem.void
User-defined identifier of the ShoppingListLineItem.void
setName
(LocalizedString name) Name of the Product.void
setProductId
(String productId) Unique identifier of a Product.void
setProductSlug
(LocalizedString productSlug) Slug of the current ProductData.void
setProductType
(ProductTypeReference productType) The Product Type defining the Attributes of the Product.void
setQuantity
(Long quantity) Number of Products in the ShoppingListLineItem.void
setVariant
(ProductVariant variant) Data of the ProductVariant.void
setVariantId
(Long variantId) id
of the ProductVariant the ShoppingListLineItem refers to.toString()
Methods inherited from interface com.commercetools.api.models.Customizable
unwrapCustomizable
Methods inherited from interface io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
Methods inherited from interface com.commercetools.api.models.shopping_list.ShoppingListLineItem
withShoppingListLineItem
-
Constructor Details
-
ShoppingListLineItemImpl
public ShoppingListLineItemImpl()create empty instance
-
-
Method Details
-
getAddedAt
Date and time (UTC) the ShoppingListLineItem was added to the ShoppingList.
- Specified by:
getAddedAt
in interfaceShoppingListLineItem
- Returns:
- addedAt
-
getCustom
Custom Fields of the ShoppingListLineItem.
- Specified by:
getCustom
in interfaceCustomizable<ShoppingListLineItem>
- Specified by:
getCustom
in interfaceShoppingListLineItem
- Returns:
- custom
-
getDeactivatedAt
If the Product or Product Variant is deleted,
deactivatedAt
is the date and time (UTC) of deletion.This data is updated in an eventual consistent manner when the Product Variant cannot be ordered anymore.
- Specified by:
getDeactivatedAt
in interfaceShoppingListLineItem
- Returns:
- deactivatedAt
-
getId
Unique identifier of the ShoppingListLineItem.
- Specified by:
getId
in interfaceShoppingListLineItem
- Returns:
- id
-
getKey
User-defined identifier of the ShoppingListLineItem. It is unique per ShoppingList.
- Specified by:
getKey
in interfaceShoppingListLineItem
- Returns:
- key
-
getName
Name of the Product.
This data is updated in an eventual consistent manner when the Product's name changes.
- Specified by:
getName
in interfaceShoppingListLineItem
- Returns:
- name
-
getProductId
Unique identifier of a Product.
- Specified by:
getProductId
in interfaceShoppingListLineItem
- Returns:
- productId
-
getProductType
The Product Type defining the Attributes of the Product.
- Specified by:
getProductType
in interfaceShoppingListLineItem
- Returns:
- productType
-
getQuantity
Number of Products in the ShoppingListLineItem.
- Specified by:
getQuantity
in interfaceShoppingListLineItem
- Returns:
- quantity
-
getVariantId
id
of the ProductVariant the ShoppingListLineItem refers to. If not set, the ShoppingListLineItem refers to the Master Variant.- Specified by:
getVariantId
in interfaceShoppingListLineItem
- Returns:
- variantId
-
getVariant
Data of the ProductVariant.
Returned when expanded using
expand=lineItems[*].variant
. You cannot expand only a single element of the array.- Specified by:
getVariant
in interfaceShoppingListLineItem
- Returns:
- variant
-
getProductSlug
Slug of the current ProductData.
Returned when expanded using
expand=lineItems[*].productSlug
. You cannot expand only a single element of the array.- Specified by:
getProductSlug
in interfaceShoppingListLineItem
- Returns:
- productSlug
-
setAddedAt
Description copied from interface:ShoppingListLineItem
Date and time (UTC) the ShoppingListLineItem was added to the ShoppingList.
- Specified by:
setAddedAt
in interfaceShoppingListLineItem
- Parameters:
addedAt
- value to be set
-
setCustom
Description copied from interface:ShoppingListLineItem
Custom Fields of the ShoppingListLineItem.
- Specified by:
setCustom
in interfaceCustomizable<ShoppingListLineItem>
- Specified by:
setCustom
in interfaceShoppingListLineItem
- Parameters:
custom
- value to be set
-
setDeactivatedAt
Description copied from interface:ShoppingListLineItem
If the Product or Product Variant is deleted,
deactivatedAt
is the date and time (UTC) of deletion.This data is updated in an eventual consistent manner when the Product Variant cannot be ordered anymore.
- Specified by:
setDeactivatedAt
in interfaceShoppingListLineItem
- Parameters:
deactivatedAt
- value to be set
-
setId
Description copied from interface:ShoppingListLineItem
Unique identifier of the ShoppingListLineItem.
- Specified by:
setId
in interfaceShoppingListLineItem
- Parameters:
id
- value to be set
-
setKey
Description copied from interface:ShoppingListLineItem
User-defined identifier of the ShoppingListLineItem. It is unique per ShoppingList.
- Specified by:
setKey
in interfaceShoppingListLineItem
- Parameters:
key
- value to be set
-
setName
Description copied from interface:ShoppingListLineItem
Name of the Product.
This data is updated in an eventual consistent manner when the Product's name changes.
- Specified by:
setName
in interfaceShoppingListLineItem
- Parameters:
name
- value to be set
-
setProductId
Description copied from interface:ShoppingListLineItem
Unique identifier of a Product.
- Specified by:
setProductId
in interfaceShoppingListLineItem
- Parameters:
productId
- value to be set
-
setProductType
Description copied from interface:ShoppingListLineItem
The Product Type defining the Attributes of the Product.
- Specified by:
setProductType
in interfaceShoppingListLineItem
- Parameters:
productType
- value to be set
-
setQuantity
Description copied from interface:ShoppingListLineItem
Number of Products in the ShoppingListLineItem.
- Specified by:
setQuantity
in interfaceShoppingListLineItem
- Parameters:
quantity
- value to be set
-
setVariantId
Description copied from interface:ShoppingListLineItem
id
of the ProductVariant the ShoppingListLineItem refers to. If not set, the ShoppingListLineItem refers to the Master Variant.- Specified by:
setVariantId
in interfaceShoppingListLineItem
- Parameters:
variantId
- value to be set
-
setVariant
Description copied from interface:ShoppingListLineItem
Data of the ProductVariant.
Returned when expanded using
expand=lineItems[*].variant
. You cannot expand only a single element of the array.- Specified by:
setVariant
in interfaceShoppingListLineItem
- Parameters:
variant
- value to be set
-
setProductSlug
Description copied from interface:ShoppingListLineItem
Slug of the current ProductData.
Returned when expanded using
expand=lineItems[*].productSlug
. You cannot expand only a single element of the array.- Specified by:
setProductSlug
in interfaceShoppingListLineItem
- Parameters:
productSlug
- value to be set
-
equals
-
hashCode
public int hashCode() -
toString
-