Interface VariantAttributesVariant
A Variant with its requested Attributes and lightweight availability information.
Example to create an instance using the builder pattern
VariantAttributesVariant variantAttributesVariant = VariantAttributesVariant.builder()
.id("{id}")
.plusAttributes(attributesBuilder -> attributesBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for VariantAttributesVariantbuilder(VariantAttributesVariant template) create builder for VariantAttributesVariant instancecopyDeep()static VariantAttributesVariantdeepCopy(VariantAttributesVariant template) factory method to create a deep copy of VariantAttributesVariantRequested Attributes of the Variant.Availability information for this variant.@NotNull StringgetId()Unique identifier of the Variant.getKey()Key of the Variant.getSku()SKU of the Variant.static VariantAttributesVariantof()factory methodstatic VariantAttributesVariantof(VariantAttributesVariant template) factory method to create a shallow copy VariantAttributesVariantvoidsetAttributes(Attribute... attributes) Requested Attributes of the Variant.voidsetAttributes(List<Attribute> attributes) Requested Attributes of the Variant.voidsetAvailability(VariantAttributesAvailability availability) Availability information for this variant.voidUnique identifier of the Variant.voidKey of the Variant.voidSKU of the Variant.static tools.jackson.core.type.TypeReference<VariantAttributesVariant>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map function
-
Method Details
-
getId
Unique identifier of the Variant.
- Returns:
- id
-
getSku
String getSku()SKU of the Variant.
- Returns:
- sku
-
getKey
String getKey()Key of the Variant.
- Returns:
- key
-
getAvailability
Availability information for this variant. Present only if InventoryEntries exist for the variant's SKU.
- Returns:
- availability
-
getAttributes
Requested Attributes of the Variant. Only Variant-level Attributes that exist on this Variant and were requested via
filter[attributes]are included.- Returns:
- attributes
-
setId
Unique identifier of the Variant.
- Parameters:
id- value to be set
-
setSku
SKU of the Variant.
- Parameters:
sku- value to be set
-
setKey
Key of the Variant.
- Parameters:
key- value to be set
-
setAvailability
Availability information for this variant. Present only if InventoryEntries exist for the variant's SKU.
- Parameters:
availability- value to be set
-
setAttributes
Requested Attributes of the Variant. Only Variant-level Attributes that exist on this Variant and were requested via
filter[attributes]are included.- Parameters:
attributes- values to be set
-
setAttributes
Requested Attributes of the Variant. Only Variant-level Attributes that exist on this Variant and were requested via
filter[attributes]are included.- Parameters:
attributes- values to be set
-
of
factory method- Returns:
- instance of VariantAttributesVariant
-
of
factory method to create a shallow copy VariantAttributesVariant- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
VariantAttributesVariant copyDeep() -
deepCopy
factory method to create a deep copy of VariantAttributesVariant- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for VariantAttributesVariant- Returns:
- builder
-
builder
create builder for VariantAttributesVariant instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withVariantAttributesVariant
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
-