Class CentPrecisionMoneyDraftBuilder
java.lang.Object
com.commercetools.api.models.common.CentPrecisionMoneyDraftBuilder
- All Implemented Interfaces:
Builder<CentPrecisionMoneyDraft>
public class CentPrecisionMoneyDraftBuilder
extends Object
implements Builder<CentPrecisionMoneyDraft>
CentPrecisionMoneyDraftBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CentPrecisionMoneyDraft centPrecisionMoneyDraft = CentPrecisionMoneyDraft.builder()
.currencyCode("{currencyCode}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CentPrecisionMoneyDraft with checking for non-null required valuesbuilds CentPrecisionMoneyDraft without checking for non-null required valuescentAmount
(Long centAmount) Amount in the smallest indivisible unit of a currency.currencyCode
(String currencyCode) Currency code compliant to ISO 4217.fractionDigits
(Integer fractionDigits) This field is optional for cent precision.Amount in the smallest indivisible unit of a currency.Currency code compliant to ISO 4217.This field is optional for cent precision.of()
factory method for an instance of CentPrecisionMoneyDraftBuilderof
(CentPrecisionMoneyDraft template) create builder for CentPrecisionMoneyDraft instance
-
Constructor Details
-
CentPrecisionMoneyDraftBuilder
public CentPrecisionMoneyDraftBuilder()
-
-
Method Details
-
centAmount
Amount in the smallest indivisible unit of a currency.
- Parameters:
centAmount
- value to be set- Returns:
- Builder
-
currencyCode
Currency code compliant to ISO 4217.
- Parameters:
currencyCode
- value to be set- Returns:
- Builder
-
fractionDigits
This field is optional for cent precision. If provided, it must be equal to the default number of fraction digits for the specified currency.
- Parameters:
fractionDigits
- value to be set- Returns:
- Builder
-
getCentAmount
Amount in the smallest indivisible unit of a currency.
- Returns:
- centAmount
-
getCurrencyCode
Currency code compliant to ISO 4217.
- Returns:
- currencyCode
-
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.
- Returns:
- fractionDigits
-
build
builds CentPrecisionMoneyDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<CentPrecisionMoneyDraft>
- Returns:
- CentPrecisionMoneyDraft
-
buildUnchecked
builds CentPrecisionMoneyDraft without checking for non-null required values- Returns:
- CentPrecisionMoneyDraft
-
of
factory method for an instance of CentPrecisionMoneyDraftBuilder- Returns:
- builder
-
of
create builder for CentPrecisionMoneyDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-