Class CartClassificationTierBuilder
java.lang.Object
com.commercetools.importapi.models.orders.CartClassificationTierBuilder
- All Implemented Interfaces:
Builder<CartClassificationTier>
public class CartClassificationTierBuilder
extends Object
implements Builder<CartClassificationTier>
CartClassificationTierBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CartClassificationTier cartClassificationTier = CartClassificationTier.builder()
.value("{value}")
.price(priceBuilder -> priceBuilder)
.plusTiers(tiersBuilder -> tiersBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds CartClassificationTier with checking for non-null required valuesbuilds CartClassificationTier without checking for non-null required valuesvalue of isMatching}getPrice()value of price}getTiers()value of tiers}getValue()value of value}isMatching(Boolean isMatching) set the value to the isMatchingof()factory method for an instance of CartClassificationTierBuilderof(CartClassificationTier template) create builder for CartClassificationTier instanceplusTiers(ShippingRatePriceTier... tiers) add values to the tiersplusTiers(Function<ShippingRatePriceTierBuilder, Builder<? extends ShippingRatePriceTier>> builder) add a value to the tiers using the builder functionset the value to the priceprice(Function<MoneyBuilder, MoneyBuilder> builder) set the value to the price using the builder functiontiers(ShippingRatePriceTier... tiers) set values to the tierstiers(List<ShippingRatePriceTier> tiers) set value to the tiersset the value to the valuewithPrice(Function<MoneyBuilder, Money> builder) set the value to the price using the builder functionwithTiers(Function<ShippingRatePriceTierBuilder, Builder<? extends ShippingRatePriceTier>> builder) set the value to the tiers using the builder function
-
Constructor Details
-
CartClassificationTierBuilder
public CartClassificationTierBuilder()
-
-
Method Details
-
value
set the value to the value- Parameters:
value- value to be set- Returns:
- Builder
-
price
set the value to the price using the builder function- Parameters:
builder- function to build the price value- Returns:
- Builder
-
withPrice
set the value to the price using the builder function- Parameters:
builder- function to build the price value- Returns:
- Builder
-
price
set the value to the price- Parameters:
price- value to be set- Returns:
- Builder
-
tiers
set values to the tiers- Parameters:
tiers- value to be set- Returns:
- Builder
-
tiers
set value to the tiers- Parameters:
tiers- value to be set- Returns:
- Builder
-
plusTiers
add values to the tiers- Parameters:
tiers- value to be set- Returns:
- Builder
-
plusTiers
public CartClassificationTierBuilder plusTiers(Function<ShippingRatePriceTierBuilder, Builder<? extends ShippingRatePriceTier>> builder) add a value to the tiers using the builder function- Parameters:
builder- function to build the tiers value- Returns:
- Builder
-
withTiers
public CartClassificationTierBuilder withTiers(Function<ShippingRatePriceTierBuilder, Builder<? extends ShippingRatePriceTier>> builder) set the value to the tiers using the builder function- Parameters:
builder- function to build the tiers value- Returns:
- Builder
-
isMatching
set the value to the isMatching- Parameters:
isMatching- value to be set- Returns:
- Builder
-
getValue
value of value}- Returns:
- value
-
getPrice
value of price}- Returns:
- price
-
getTiers
value of tiers}- Returns:
- tiers
-
getIsMatching
value of isMatching}- Returns:
- isMatching
-
build
builds CartClassificationTier with checking for non-null required values- Specified by:
buildin interfaceBuilder<CartClassificationTier>- Returns:
- CartClassificationTier
-
buildUnchecked
builds CartClassificationTier without checking for non-null required values- Returns:
- CartClassificationTier
-
of
factory method for an instance of CartClassificationTierBuilder- Returns:
- builder
-
of
create builder for CartClassificationTier instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-