Class CartScoreTierBuilder
- All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<CartScoreTier>
Example to create an instance using the builder pattern
CartScoreTier cartScoreTier = CartScoreTier.builder()
.score(0.3)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CartScoreTier with checking for non-null required valuesbuilds CartScoreTier without checking for non-null required valuesAppears in response to Get ShippingMethods for a Cart if the shipping rate matches the search query.getPrice()
Defines a fixed price for thescore
.Dynamically calculates a Price for a range of scores.getScore()
Abstract value for categorizing a Cart.isMatching
(Boolean isMatching) Appears in response to Get ShippingMethods for a Cart if the shipping rate matches the search query.static CartScoreTierBuilder
of()
factory method for an instance of CartScoreTierBuilderstatic CartScoreTierBuilder
of
(CartScoreTier template) create builder for CartScoreTier instanceDefines a fixed price for thescore
.price
(Function<MoneyBuilder, MoneyBuilder> builder) Defines a fixed price for thescore
.priceFunction
(PriceFunction priceFunction) Dynamically calculates a Price for a range of scores.Dynamically calculates a Price for a range of scores.Abstract value for categorizing a Cart.withPrice
(Function<MoneyBuilder, Money> builder) Defines a fixed price for thescore
.Dynamically calculates a Price for a range of scores.
-
Constructor Details
-
CartScoreTierBuilder
public CartScoreTierBuilder()
-
-
Method Details
-
score
Abstract value for categorizing a Cart. The range starts at
0
. The default price covers0
, tiers start at1
. See Using Tiered Shipping Rates for details and examples.- Parameters:
score
- value to be set- Returns:
- Builder
-
price
Defines a fixed price for the
score
.- Parameters:
builder
- function to build the price value- Returns:
- Builder
-
withPrice
Defines a fixed price for the
score
.- Parameters:
builder
- function to build the price value- Returns:
- Builder
-
price
Defines a fixed price for the
score
.- Parameters:
price
- value to be set- Returns:
- Builder
-
priceFunction
public CartScoreTierBuilder priceFunction(Function<PriceFunctionBuilder, PriceFunctionBuilder> builder) Dynamically calculates a Price for a range of scores.
- Parameters:
builder
- function to build the priceFunction value- Returns:
- Builder
-
withPriceFunction
Dynamically calculates a Price for a range of scores.
- Parameters:
builder
- function to build the priceFunction value- Returns:
- Builder
-
priceFunction
Dynamically calculates a Price for a range of scores.
- Parameters:
priceFunction
- 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
-
getScore
Abstract value for categorizing a Cart. The range starts at
0
. The default price covers0
, tiers start at1
. See Using Tiered Shipping Rates for details and examples.- Returns:
- score
-
getPrice
Defines a fixed price for the
score
.- Returns:
- price
-
getPriceFunction
Dynamically calculates a Price for a range of scores.
- Returns:
- priceFunction
-
getIsMatching
Appears in response to Get ShippingMethods for a Cart if the shipping rate matches the search query.
- Returns:
- isMatching
-
build
builds CartScoreTier with checking for non-null required values- Specified by:
build
in interfaceio.vrap.rmf.base.client.Builder<CartScoreTier>
- Returns:
- CartScoreTier
-
buildUnchecked
builds CartScoreTier without checking for non-null required values- Returns:
- CartScoreTier
-
of
factory method for an instance of CartScoreTierBuilder- Returns:
- builder
-
of
create builder for CartScoreTier instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-