Class CartValueTierBuilder
java.lang.Object
com.commercetools.api.models.shipping_method.CartValueTierBuilder
- All Implemented Interfaces:
Builder<CartValueTier>
CartValueTierBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CartValueTier cartValueTier = CartValueTier.builder()
.minimumCentAmount(1)
.price(priceBuilder -> priceBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CartValueTier with checking for non-null required valuesbuilds CartValueTier without checking for non-null required valuesAppears in response to Get ShippingMethods for a Cart if the shipping rate matches the search query.Minimum total price of a Cart for which a shipping rate applies.getPrice()
Fixed shipping rate Price for a CartValue.isMatching
(Boolean isMatching) Appears in response to Get ShippingMethods for a Cart if the shipping rate matches the search query.minimumCentAmount
(Long minimumCentAmount) Minimum total price of a Cart for which a shipping rate applies.static CartValueTierBuilder
of()
factory method for an instance of CartValueTierBuilderstatic CartValueTierBuilder
of
(CartValueTier template) create builder for CartValueTier instanceFixed shipping rate Price for a CartValue.price
(Function<MoneyBuilder, MoneyBuilder> builder) Fixed shipping rate Price for a CartValue.withPrice
(Function<MoneyBuilder, Money> builder) Fixed shipping rate Price for a CartValue.
-
Constructor Details
-
CartValueTierBuilder
public CartValueTierBuilder()
-
-
Method Details
-
minimumCentAmount
Minimum total price of a Cart for which a shipping rate applies.
- Parameters:
minimumCentAmount
- value to be set- Returns:
- Builder
-
price
Fixed shipping rate Price for a CartValue.
- Parameters:
builder
- function to build the price value- Returns:
- Builder
-
withPrice
Fixed shipping rate Price for a CartValue.
- Parameters:
builder
- function to build the price value- Returns:
- Builder
-
price
Fixed shipping rate Price for a CartValue.
- 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
-
getMinimumCentAmount
Minimum total price of a Cart for which a shipping rate applies.
- Returns:
- minimumCentAmount
-
getPrice
Fixed shipping rate Price for a CartValue.
- Returns:
- price
-
getIsMatching
Appears in response to Get ShippingMethods for a Cart if the shipping rate matches the search query.
- Returns:
- isMatching
-
build
builds CartValueTier with checking for non-null required values- Specified by:
build
in interfaceBuilder<CartValueTier>
- Returns:
- CartValueTier
-
buildUnchecked
builds CartValueTier without checking for non-null required values- Returns:
- CartValueTier
-
of
factory method for an instance of CartValueTierBuilder- Returns:
- builder
-
of
create builder for CartValueTier instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-