Interface Money
- All Superinterfaces:
TypedMoney
Money
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
Money money = Money.builder()
.centAmount(0.3)
.currencyCode("{currencyCode}")
.build()
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic MoneyBuilder
builder()
builder factory method for Moneystatic MoneyBuilder
create builder for Money instancestatic Money
factory method to create a deep copy of Moneystatic Money
of()
factory methodstatic Money
factory method to create a shallow copy Moneystatic com.fasterxml.jackson.core.type.TypeReference<Money>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.importapi.models.common.TypedMoney
getCentAmount, getCurrencyCode, getFractionDigits, getType, setCentAmount, setCurrencyCode, setFractionDigits, withTypedMoney
-
Field Details
-
CENT_PRECISION
discriminator value for Money- See Also:
-
-
Method Details
-
of
factory method- Returns:
- instance of Money
-
of
factory method to create a shallow copy Money- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of Money- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for Money- Returns:
- builder
-
builder
create builder for Money instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withMoney
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
-