Interface MoneyAttribute
- All Superinterfaces:
Attribute
This type represents an attribute whose value is a money object.
Example to create an instance using the builder pattern
MoneyAttribute moneyAttribute = MoneyAttribute.builder()
.value(valueBuilder -> valueBuilder)
.build()
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic MoneyAttributeBuilder
builder()
builder factory method for MoneyAttributestatic MoneyAttributeBuilder
builder
(MoneyAttribute template) create builder for MoneyAttribute instancestatic MoneyAttribute
deepCopy
(MoneyAttribute template) factory method to create a deep copy of MoneyAttribute@NotNull @Valid TypedMoney
getValue()
static MoneyAttribute
of()
factory methodstatic MoneyAttribute
of
(MoneyAttribute template) factory method to create a shallow copy MoneyAttributevoid
setValue
(TypedMoney value) set valuestatic com.fasterxml.jackson.core.type.TypeReference<MoneyAttribute>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withMoneyAttribute
(Function<MoneyAttribute, T> helper) accessor map functionMethods inherited from interface com.commercetools.importapi.models.productvariants.Attribute
getName, getType, setName, withAttribute
-
Field Details
-
MONEY
discriminator value for MoneyAttribute- See Also:
-
-
Method Details
-
getValue
- Returns:
- value
-
setValue
set value- Parameters:
value
- value to be set
-
of
factory method- Returns:
- instance of MoneyAttribute
-
of
factory method to create a shallow copy MoneyAttribute- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of MoneyAttribute- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for MoneyAttribute- Returns:
- builder
-
builder
create builder for MoneyAttribute instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withMoneyAttribute
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
-