Interface CentPrecisionMoneyDraft
- All Superinterfaces:
Comparable<javax.money.MonetaryAmount>
,javax.money.CurrencySupplier
,Draft<CentPrecisionMoneyDraft>
,javax.money.MonetaryAmount
,MonetaryAmountConvertable
,Money
,javax.money.NumberSupplier
,TypedMoneyDraft
This draft type is the alternative to Money.
Example to create an instance using the builder pattern
CentPrecisionMoneyDraft centPrecisionMoneyDraft = CentPrecisionMoneyDraft.builder()
.currencyCode("{currencyCode}")
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for CentPrecisionMoneyDraft -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for CentPrecisionMoneyDraftbuilder
(CentPrecisionMoneyDraft template) create builder for CentPrecisionMoneyDraft instancestatic CentPrecisionMoneyDraft
deepCopy
(CentPrecisionMoneyDraft template) factory method to create a deep copy of CentPrecisionMoneyDraftThis field is optional for cent precision.static CentPrecisionMoneyDraft
of()
factory methodstatic CentPrecisionMoneyDraft
of
(CentPrecisionMoney template) static CentPrecisionMoneyDraft
of
(CentPrecisionMoneyDraft template) factory method to create a shallow copy CentPrecisionMoneyDraftstatic CentPrecisionMoneyDraft
of
(javax.money.MonetaryAmount monetaryAmount) void
setFractionDigits
(Integer fractionDigits) This field is optional for cent precision.static com.fasterxml.jackson.core.type.TypeReference<CentPrecisionMoneyDraft>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface javax.money.MonetaryAmount
isNegative, isNegativeOrZero, isPositive, isPositiveOrZero, isZero
Methods inherited from interface com.commercetools.api.models.common.MonetaryAmountConvertable
toMonetaryAmount
Methods inherited from interface com.commercetools.api.models.common.Money
abs, add, compareTo, divide, divide, divide, divideAndRemainder, divideAndRemainder, divideAndRemainder, divideToIntegralValue, divideToIntegralValue, divideToIntegralValue, getContext, getCurrency, getCurrencyCode, getFactory, getNumber, isEqualTo, isGreaterThan, isGreaterThanOrEqualTo, isLessThan, isLessThanOrEqualTo, multiply, multiply, multiply, negate, plus, query, remainder, remainder, remainder, scaleByPowerOfTen, setCurrencyCode, signum, stripTrailingZeros, subtract, toDraft, with, withMoney
Methods inherited from interface com.commercetools.api.models.common.TypedMoneyDraft
createMoneyOperator, getCentAmount, getType, setCentAmount, withTypedMoneyDraft
-
Field Details
-
CENT_PRECISION
discriminator value for CentPrecisionMoneyDraft- See Also:
-
-
Method Details
-
getFractionDigits
Integer getFractionDigits()This field is optional for cent precision. If provided, it must be equal to the default number of fraction digits for the specified currency.
- Specified by:
getFractionDigits
in interfaceTypedMoneyDraft
- Returns:
- fractionDigits
-
setFractionDigits
This field is optional for cent precision. If provided, it must be equal to the default number of fraction digits for the specified currency.
- Specified by:
setFractionDigits
in interfaceTypedMoneyDraft
- Parameters:
fractionDigits
- value to be set
-
of
factory method- Returns:
- instance of CentPrecisionMoneyDraft
-
of
factory method to create a shallow copy CentPrecisionMoneyDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of CentPrecisionMoneyDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CentPrecisionMoneyDraft- Returns:
- builder
-
builder
create builder for CentPrecisionMoneyDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withCentPrecisionMoneyDraft
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
of
-
of
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-