Class CartClassificationTierBuilder
java.lang.Object
com.commercetools.api.models.shipping_method.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)
.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 valuesAppears in response to Get ShippingMethods for a Cart if the shipping rate matches the search query.getPrice()Fixed shipping rate for the selected classification.getValue()isMatching(Boolean isMatching) Appears in response to Get ShippingMethods for a Cart if the shipping rate matches the search query.of()factory method for an instance of CartClassificationTierBuilderof(CartClassificationTier template) create builder for CartClassificationTier instanceFixed shipping rate for the selected classification.price(Function<MoneyBuilder, MoneyBuilder> builder) Fixed shipping rate for the selected classification.withPrice(Function<MoneyBuilder, Money> builder) Fixed shipping rate for the selected classification.
-
Constructor Details
-
CartClassificationTierBuilder
public CartClassificationTierBuilder()
-
-
Method Details
-
value
keyselected from thevaluesof the CartClassificationType configured in the Project.- Parameters:
value- value to be set- Returns:
- Builder
-
price
Fixed shipping rate for the selected classification.
- Parameters:
builder- function to build the price value- Returns:
- Builder
-
withPrice
Fixed shipping rate for the selected classification.
- Parameters:
builder- function to build the price value- Returns:
- Builder
-
price
Fixed shipping rate for the selected classification.
- Parameters:
price- value to be set- Returns:
- Builder
-
isMatching
Appears in response to Get ShippingMethods for a Cart if the shipping rate matches the search query.
- Parameters:
isMatching- value to be set- Returns:
- Builder
-
getValue
keyselected from thevaluesof the CartClassificationType configured in the Project.- Returns:
- value
-
getPrice
Fixed shipping rate for the selected classification.
- Returns:
- price
-
getIsMatching
Appears in response to Get ShippingMethods for a Cart if the shipping rate matches the search query.
- 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
-