Interface MoneyField
- All Superinterfaces:
CustomField
A field with a money value.
Example to create an instance using the builder pattern
MoneyField moneyField = MoneyField.builder()
.value(valueBuilder -> valueBuilder)
.build()
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic MoneyFieldBuilder
builder()
builder factory method for MoneyFieldstatic MoneyFieldBuilder
builder
(MoneyField template) create builder for MoneyField instancestatic MoneyField
deepCopy
(MoneyField template) factory method to create a deep copy of MoneyField@NotNull @Valid TypedMoney
getValue()
static MoneyField
of()
factory methodstatic MoneyField
of
(MoneyField template) factory method to create a shallow copy MoneyFieldvoid
setValue
(TypedMoney value) set valuestatic com.fasterxml.jackson.core.type.TypeReference<MoneyField>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withMoneyField
(Function<MoneyField, T> helper) accessor map functionMethods inherited from interface com.commercetools.importapi.models.customfields.CustomField
getType, withCustomField
-
Field Details
-
MONEY
discriminator value for MoneyField- See Also:
-
-
Method Details
-
getValue
- Returns:
- value
-
setValue
set value- Parameters:
value
- value to be set
-
of
factory method- Returns:
- instance of MoneyField
-
of
factory method to create a shallow copy MoneyField- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of MoneyField- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for MoneyField- Returns:
- builder
-
builder
create builder for MoneyField instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withMoneyField
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
-