Class ProductVariantImpl
- All Implemented Interfaces:
AttributeContainer
,ProductVariant
,WithKey
,io.vrap.rmf.base.client.ModelBase
A concrete sellable good for which inventory can be tracked. Product Variants are generally mapped to specific SKUs.
-
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
Media assets of the Product Variant.Attributes of the Product Variant.Set if the Product Variant is tracked by Inventory.getId()
A unique, sequential identifier of the Product Variant within the Product.Images of the Product Variant.true
if the Product Variant matches the search query.getKey()
User-defined unique identifier of the ProductVariant.getPrice()
Only available when Price selection is used.The Embedded Prices of the Product Variant.Only available in response to a Product Projection Search request with price selection.Only available in response to a Product Projection Search request with price selection.getSku()
User-defined unique SKU of the Product Variant.int
hashCode()
void
Media assets of the Product Variant.void
Media assets of the Product Variant.void
setAttributes
(Attribute... attributes) Attributes of the Product Variant.void
setAttributes
(List<Attribute> attributes) Attributes of the Product Variant.void
setAvailability
(ProductVariantAvailability availability) Set if the Product Variant is tracked by Inventory.void
A unique, sequential identifier of the Product Variant within the Product.void
Images of the Product Variant.void
Images of the Product Variant.void
setIsMatchingVariant
(Boolean isMatchingVariant) true
if the Product Variant matches the search query.void
User-defined unique identifier of the ProductVariant.void
Only available when Price selection is used.void
The Embedded Prices of the Product Variant.void
The Embedded Prices of the Product Variant.void
setScopedPrice
(ScopedPrice scopedPrice) Only available in response to a Product Projection Search request with price selection.void
setScopedPriceDiscounted
(Boolean scopedPriceDiscounted) Only available in response to a Product Projection Search request with price selection.void
User-defined unique SKU of the Product Variant.Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.commercetools.api.models.product.AttributeContainer
findAttribute, getAttribute, hasAttribute
Methods inherited from interface io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
Methods inherited from interface com.commercetools.api.models.product.ProductVariant
withProductVariant
-
Constructor Details
-
ProductVariantImpl
public ProductVariantImpl()create empty instance
-
-
Method Details
-
getId
A unique, sequential identifier of the Product Variant within the Product.
- Specified by:
getId
in interfaceProductVariant
- Returns:
- id
-
getSku
User-defined unique SKU of the Product Variant.
- Specified by:
getSku
in interfaceProductVariant
- Returns:
- sku
-
getKey
User-defined unique identifier of the ProductVariant.
This is different from Product
key
.- Specified by:
getKey
in interfaceProductVariant
- Specified by:
getKey
in interfaceWithKey
- Returns:
- key
-
getPrices
The Embedded Prices of the Product Variant. Cannot contain two Prices of the same Price scope (with same currency, country, Customer Group, Channel,
validFrom
andvalidUntil
).- Specified by:
getPrices
in interfaceProductVariant
- Returns:
- prices
-
getAttributes
Attributes of the Product Variant.
- Specified by:
getAttributes
in interfaceAttributeContainer
- Specified by:
getAttributes
in interfaceProductVariant
- Returns:
- attributes
-
getPrice
Only available when Price selection is used. Cannot be used in a Query Predicate.
- Specified by:
getPrice
in interfaceProductVariant
- Returns:
- price
-
getImages
Images of the Product Variant.
- Specified by:
getImages
in interfaceProductVariant
- Returns:
- images
-
getAssets
Media assets of the Product Variant.
- Specified by:
getAssets
in interfaceProductVariant
- Returns:
- assets
-
getAvailability
Set if the Product Variant is tracked by Inventory. Can be used as an optimization to reduce calls to the Inventory service. May not contain the latest Inventory State (it is eventually consistent).
- Specified by:
getAvailability
in interfaceProductVariant
- Returns:
- availability
-
getIsMatchingVariant
true
if the Product Variant matches the search query. Only available in response to a Product Projection Search request.- Specified by:
getIsMatchingVariant
in interfaceProductVariant
- Returns:
- isMatchingVariant
-
getScopedPrice
Only available in response to a Product Projection Search request with price selection. Can be used to sort, filter, and facet.
- Specified by:
getScopedPrice
in interfaceProductVariant
- Returns:
- scopedPrice
-
getScopedPriceDiscounted
Only available in response to a Product Projection Search request with price selection.
- Specified by:
getScopedPriceDiscounted
in interfaceProductVariant
- Returns:
- scopedPriceDiscounted
-
setId
Description copied from interface:ProductVariant
A unique, sequential identifier of the Product Variant within the Product.
- Specified by:
setId
in interfaceProductVariant
- Parameters:
id
- value to be set
-
setSku
Description copied from interface:ProductVariant
User-defined unique SKU of the Product Variant.
- Specified by:
setSku
in interfaceProductVariant
- Parameters:
sku
- value to be set
-
setKey
Description copied from interface:ProductVariant
User-defined unique identifier of the ProductVariant.
This is different from Product
key
.- Specified by:
setKey
in interfaceProductVariant
- Parameters:
key
- value to be set
-
setPrices
Description copied from interface:ProductVariant
The Embedded Prices of the Product Variant. Cannot contain two Prices of the same Price scope (with same currency, country, Customer Group, Channel,
validFrom
andvalidUntil
).- Specified by:
setPrices
in interfaceProductVariant
- Parameters:
prices
- values to be set
-
setPrices
Description copied from interface:ProductVariant
The Embedded Prices of the Product Variant. Cannot contain two Prices of the same Price scope (with same currency, country, Customer Group, Channel,
validFrom
andvalidUntil
).- Specified by:
setPrices
in interfaceProductVariant
- Parameters:
prices
- values to be set
-
setAttributes
Description copied from interface:ProductVariant
Attributes of the Product Variant.
- Specified by:
setAttributes
in interfaceProductVariant
- Parameters:
attributes
- values to be set
-
setAttributes
Description copied from interface:ProductVariant
Attributes of the Product Variant.
- Specified by:
setAttributes
in interfaceProductVariant
- Parameters:
attributes
- values to be set
-
setPrice
Description copied from interface:ProductVariant
Only available when Price selection is used. Cannot be used in a Query Predicate.
- Specified by:
setPrice
in interfaceProductVariant
- Parameters:
price
- value to be set
-
setImages
Description copied from interface:ProductVariant
Images of the Product Variant.
- Specified by:
setImages
in interfaceProductVariant
- Parameters:
images
- values to be set
-
setImages
Description copied from interface:ProductVariant
Images of the Product Variant.
- Specified by:
setImages
in interfaceProductVariant
- Parameters:
images
- values to be set
-
setAssets
Description copied from interface:ProductVariant
Media assets of the Product Variant.
- Specified by:
setAssets
in interfaceProductVariant
- Parameters:
assets
- values to be set
-
setAssets
Description copied from interface:ProductVariant
Media assets of the Product Variant.
- Specified by:
setAssets
in interfaceProductVariant
- Parameters:
assets
- values to be set
-
setAvailability
Description copied from interface:ProductVariant
Set if the Product Variant is tracked by Inventory. Can be used as an optimization to reduce calls to the Inventory service. May not contain the latest Inventory State (it is eventually consistent).
- Specified by:
setAvailability
in interfaceProductVariant
- Parameters:
availability
- value to be set
-
setIsMatchingVariant
Description copied from interface:ProductVariant
true
if the Product Variant matches the search query. Only available in response to a Product Projection Search request.- Specified by:
setIsMatchingVariant
in interfaceProductVariant
- Parameters:
isMatchingVariant
- value to be set
-
setScopedPrice
Description copied from interface:ProductVariant
Only available in response to a Product Projection Search request with price selection. Can be used to sort, filter, and facet.
- Specified by:
setScopedPrice
in interfaceProductVariant
- Parameters:
scopedPrice
- value to be set
-
setScopedPriceDiscounted
Description copied from interface:ProductVariant
Only available in response to a Product Projection Search request with price selection.
- Specified by:
setScopedPriceDiscounted
in interfaceProductVariant
- Parameters:
scopedPriceDiscounted
- value to be set
-
equals
-
hashCode
-