Class MoneySetFieldBuilder
java.lang.Object
com.commercetools.importapi.models.customfields.MoneySetFieldBuilder
- All Implemented Interfaces:
Builder<MoneySetField>
MoneySetFieldBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
MoneySetField moneySetField = MoneySetField.builder()
.plusValue(valueBuilder -> valueBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds MoneySetField with checking for non-null required valuesbuilds MoneySetField without checking for non-null required valuesgetValue()
JSON array of money values in cent precision format.static MoneySetFieldBuilder
of()
factory method for an instance of MoneySetFieldBuilderstatic MoneySetFieldBuilder
of
(MoneySetField template) create builder for MoneySetField instanceplusValue
(TypedMoney... value) JSON array of money values in cent precision format.plusValue
(Function<TypedMoneyBuilder, Builder<? extends TypedMoney>> builder) JSON array of money values in cent precision format.value
(TypedMoney... value) JSON array of money values in cent precision format.value
(List<TypedMoney> value) JSON array of money values in cent precision format.withValue
(Function<TypedMoneyBuilder, Builder<? extends TypedMoney>> builder) JSON array of money values in cent precision format.
-
Constructor Details
-
MoneySetFieldBuilder
public MoneySetFieldBuilder()
-
-
Method Details
-
value
JSON array of money values in cent precision format. The order of items in the array is not fixed.
- Parameters:
value
- value to be set- Returns:
- Builder
-
value
JSON array of money values in cent precision format. The order of items in the array is not fixed.
- Parameters:
value
- value to be set- Returns:
- Builder
-
plusValue
JSON array of money values in cent precision format. The order of items in the array is not fixed.
- Parameters:
value
- value to be set- Returns:
- Builder
-
plusValue
public MoneySetFieldBuilder plusValue(Function<TypedMoneyBuilder, Builder<? extends TypedMoney>> builder) JSON array of money values in cent precision format. The order of items in the array is not fixed.
- Parameters:
builder
- function to build the value value- Returns:
- Builder
-
withValue
public MoneySetFieldBuilder withValue(Function<TypedMoneyBuilder, Builder<? extends TypedMoney>> builder) JSON array of money values in cent precision format. The order of items in the array is not fixed.
- Parameters:
builder
- function to build the value value- Returns:
- Builder
-
getValue
JSON array of money values in cent precision format. The order of items in the array is not fixed.
- Returns:
- value
-
build
builds MoneySetField with checking for non-null required values- Specified by:
build
in interfaceBuilder<MoneySetField>
- Returns:
- MoneySetField
-
buildUnchecked
builds MoneySetField without checking for non-null required values- Returns:
- MoneySetField
-
of
factory method for an instance of MoneySetFieldBuilder- Returns:
- builder
-
of
create builder for MoneySetField instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-