Interface VariantValues
public interface VariantValues
VariantValues
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
VariantValues variantValues = VariantValues.builder()
.plusPrices(pricesBuilder -> pricesBuilder)
.plusAttributes(attributesBuilder -> attributesBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic VariantValuesBuilder
builder()
builder factory method for VariantValuesstatic VariantValuesBuilder
builder
(VariantValues template) create builder for VariantValues instancestatic VariantValues
deepCopy
(VariantValues template) factory method to create a deep copy of VariantValuesAttributes of the ProductVariant.@NotNull @Valid List<PriceDraft>
Embedded Prices of the ProductVariant.getSku()
SKU of the ProductVariant.static VariantValues
of()
factory methodstatic VariantValues
of
(VariantValues template) factory method to create a shallow copy VariantValuesvoid
setAttributes
(Attribute... attributes) Attributes of the ProductVariant.void
setAttributes
(List<Attribute> attributes) Attributes of the ProductVariant.void
setPrices
(PriceDraft... prices) Embedded Prices of the ProductVariant.void
setPrices
(List<PriceDraft> prices) Embedded Prices of the ProductVariant.void
SKU of the ProductVariant.static com.fasterxml.jackson.core.type.TypeReference<VariantValues>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withVariantValues
(Function<VariantValues, T> helper) accessor map function
-
Method Details
-
getSku
String getSku()SKU of the ProductVariant.
- Returns:
- sku
-
getPrices
Embedded Prices of the ProductVariant.
- Returns:
- prices
-
getAttributes
Attributes of the ProductVariant.
- Returns:
- attributes
-
setSku
SKU of the ProductVariant.
- Parameters:
sku
- value to be set
-
setPrices
Embedded Prices of the ProductVariant.
- Parameters:
prices
- values to be set
-
setPrices
Embedded Prices of the ProductVariant.
- Parameters:
prices
- values to be set
-
setAttributes
Attributes of the ProductVariant.
- Parameters:
attributes
- values to be set
-
setAttributes
Attributes of the ProductVariant.
- Parameters:
attributes
- values to be set
-
of
factory method- Returns:
- instance of VariantValues
-
of
factory method to create a shallow copy VariantValues- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of VariantValues- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for VariantValues- Returns:
- builder
-
builder
create builder for VariantValues instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withVariantValues
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-