Interface CartScoreTier
- All Superinterfaces:
ShippingRatePriceTier
The ShippingRate maps to an abstract Cart categorization expressed by integers (such as shipping scores or weight ranges). Either price or priceFunction is required.
Example to create an instance using the builder pattern
CartScoreTier cartScoreTier = CartScoreTier.builder()
.score(0.3)
.build()
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic CartScoreTierBuilderbuilder()builder factory method for CartScoreTierstatic CartScoreTierBuilderbuilder(CartScoreTier template) create builder for CartScoreTier instancecopyDeep()static CartScoreTierdeepCopy(CartScoreTier template) factory method to create a deep copy of CartScoreTierAppears in response to Get ShippingMethods for a Cart if the shipping rate matches the search query.@Valid MoneygetPrice()Defines a fixed price for thescore.@Valid PriceFunctionDynamically calculates a Price for a range of scores.@NotNull IntegergetScore()Abstract value for categorizing a Cart.static CartScoreTierof()factory methodstatic CartScoreTierof(CartScoreTier template) factory method to create a shallow copy CartScoreTiervoidsetIsMatching(Boolean isMatching) Appears in response to Get ShippingMethods for a Cart if the shipping rate matches the search query.voidDefines a fixed price for thescore.voidsetPriceFunction(PriceFunction priceFunction) Dynamically calculates a Price for a range of scores.voidAbstract value for categorizing a Cart.static com.fasterxml.jackson.core.type.TypeReference<CartScoreTier>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithCartScoreTier(Function<CartScoreTier, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.shipping_method.ShippingRatePriceTier
getType, withShippingRatePriceTier
-
Field Details
-
CART_SCORE
discriminator value for CartScoreTier- See Also:
-
-
Method Details
-
getScore
Abstract value for categorizing a Cart. The range starts at
0. The default price covers0, tiers start at1. See 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
Boolean getIsMatching()Appears in response to Get ShippingMethods for a Cart if the shipping rate matches the search query.
- Returns:
- isMatching
-
setScore
Abstract value for categorizing a Cart. The range starts at
0. The default price covers0, tiers start at1. See Tiered shipping rates for details and examples.- Parameters:
score- value to be set
-
setPrice
Defines a fixed price for the
score.- Parameters:
price- value to be set
-
setPriceFunction
Dynamically calculates a Price for a range of scores.
- Parameters:
priceFunction- value to be set
-
setIsMatching
Appears in response to Get ShippingMethods for a Cart if the shipping rate matches the search query.
- Parameters:
isMatching- value to be set
-
of
factory method- Returns:
- instance of CartScoreTier
-
of
factory method to create a shallow copy CartScoreTier- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
CartScoreTier copyDeep()- Specified by:
copyDeepin interfaceShippingRatePriceTier
-
deepCopy
factory method to create a deep copy of CartScoreTier- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CartScoreTier- Returns:
- builder
-
builder
create builder for CartScoreTier instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withCartScoreTier
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-