Class PriceTierBuilder
java.lang.Object
com.commercetools.importapi.models.common.PriceTierBuilder
PriceTierBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
PriceTier priceTier = PriceTier.builder()
.minimumQuantity(0.3)
.value(valueBuilder -> valueBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds PriceTier with checking for non-null required valuesbuilds PriceTier without checking for non-null required valuesThe minimum quantity this price tier is valid for.getValue()
The currency of a price tier is always the same as the currency of the base Price.minimumQuantity
(Long minimumQuantity) The minimum quantity this price tier is valid for.static PriceTierBuilder
of()
factory method for an instance of PriceTierBuilderstatic PriceTierBuilder
create builder for PriceTier instancevalue
(TypedMoney value) The currency of a price tier is always the same as the currency of the base Price.value
(Function<TypedMoneyBuilder, Builder<? extends TypedMoney>> builder) The currency of a price tier is always the same as the currency of the base Price.
-
Constructor Details
-
PriceTierBuilder
public PriceTierBuilder()
-
-
Method Details
-
minimumQuantity
The minimum quantity this price tier is valid for.
- Parameters:
minimumQuantity
- value to be set- Returns:
- Builder
-
value
The currency of a price tier is always the same as the currency of the base Price.
- Parameters:
value
- value to be set- Returns:
- Builder
-
value
The currency of a price tier is always the same as the currency of the base Price.
- Parameters:
builder
- function to build the value value- Returns:
- Builder
-
getMinimumQuantity
The minimum quantity this price tier is valid for.
- Returns:
- minimumQuantity
-
getValue
The currency of a price tier is always the same as the currency of the base Price.
- Returns:
- value
-
build
builds PriceTier with checking for non-null required values -
buildUnchecked
builds PriceTier without checking for non-null required values- Returns:
- PriceTier
-
of
factory method for an instance of PriceTierBuilder- Returns:
- builder
-
of
create builder for PriceTier instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-