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 VariantValuesBuilderbuilder()builder factory method for VariantValuesstatic VariantValuesBuilderbuilder(VariantValues template) create builder for VariantValues instancecopyDeep()static VariantValuesdeepCopy(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 VariantValuesof()factory methodstatic VariantValuesof(VariantValues template) factory method to create a shallow copy VariantValuesvoidsetAttributes(Attribute... attributes) Attributes of the ProductVariant.voidsetAttributes(List<Attribute> attributes) Attributes of the ProductVariant.voidsetPrices(PriceDraft... prices) Embedded Prices of the ProductVariant.voidsetPrices(List<PriceDraft> prices) Embedded Prices of the ProductVariant.voidSKU of the ProductVariant.static com.fasterxml.jackson.core.type.TypeReference<VariantValues>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithVariantValues(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
-
copyDeep
VariantValues copyDeep() -
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
-