Interface CartValueTier
- All Superinterfaces:
ShippingRatePriceTier
The ShippingRate maps to the value of the Cart and is used to select a tier. The value of the Cart is the sum of all Line Item totals and Custom Line Item totals (via the totalPrice
field) after any Product Discounts and Cart Discounts have been applied. If chosen, it is not possible to set a value for the shippingRateInput
on the Cart. Tiers contain the centAmount
(a value of 100
in the currency USD
corresponds to $ 1.00
), and start at 1
.'
Example to create an instance using the builder pattern
CartValueTier cartValueTier = CartValueTier.builder()
.minimumCentAmount(1)
.price(priceBuilder -> priceBuilder)
.build()
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic CartValueTierBuilder
builder()
builder factory method for CartValueTierstatic CartValueTierBuilder
builder
(CartValueTier template) create builder for CartValueTier instancestatic CartValueTier
deepCopy
(CartValueTier template) factory method to create a deep copy of CartValueTierAppears in response to Get ShippingMethods for a Cart if the shipping rate matches the search query.@NotNull Long
Minimum total price of a Cart for which a shipping rate applies.@NotNull @Valid Money
getPrice()
Fixed shipping rate Price for a CartValue.static CartValueTier
of()
factory methodstatic CartValueTier
of
(CartValueTier template) factory method to create a shallow copy CartValueTiervoid
setIsMatching
(Boolean isMatching) Appears in response to Get ShippingMethods for a Cart if the shipping rate matches the search query.void
setMinimumCentAmount
(Long minimumCentAmount) Minimum total price of a Cart for which a shipping rate applies.void
Fixed shipping rate Price for a CartValue.static com.fasterxml.jackson.core.type.TypeReference<CartValueTier>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withCartValueTier
(Function<CartValueTier, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.shipping_method.ShippingRatePriceTier
getType, withShippingRatePriceTier
-
Field Details
-
CART_VALUE
discriminator value for CartValueTier- See Also:
-
-
Method Details
-
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
Boolean getIsMatching()Appears in response to Get ShippingMethods for a Cart if the shipping rate matches the search query.
- Returns:
- isMatching
-
setMinimumCentAmount
Minimum total price of a Cart for which a shipping rate applies.
- Parameters:
minimumCentAmount
- value to be set
-
setPrice
Fixed shipping rate Price for a CartValue.
- Parameters:
price
- 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 CartValueTier
-
of
factory method to create a shallow copy CartValueTier- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of CartValueTier- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CartValueTier- Returns:
- builder
-
builder
create builder for CartValueTier instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withCartValueTier
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
-