Class CartScoreTierImpl
- All Implemented Interfaces:
CartScoreTier
,ShippingRatePriceTier
,io.vrap.rmf.base.client.ModelBase
Used when the ShippingRate maps to an abstract Cart categorization expressed by integers (such as shipping scores or weight ranges). Either price
or priceFunction
is required.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vrap.rmf.base.client.ModelBase
io.vrap.rmf.base.client.ModelBase.FilteredRecursiveToStringStyle
-
Field Summary
Fields inherited from interface com.commercetools.api.models.shipping_method.CartScoreTier
CART_SCORE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Appears 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.getType()
int
hashCode()
void
setIsMatching
(Boolean isMatching) Appears in response to Get ShippingMethods for a Cart if the shipping rate matches the search query.void
Defines a fixed price for thescore
.void
setPriceFunction
(PriceFunction priceFunction) Dynamically calculates a Price for a range of scores.void
Abstract value for categorizing a Cart.Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.commercetools.api.models.shipping_method.CartScoreTier
withCartScoreTier
Methods inherited from interface io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
Methods inherited from interface com.commercetools.api.models.shipping_method.ShippingRatePriceTier
withShippingRatePriceTier
-
Constructor Details
-
CartScoreTierImpl
public CartScoreTierImpl()create empty instance
-
-
Method Details
-
getType
- Specified by:
getType
in interfaceShippingRatePriceTier
- Returns:
- type
-
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.- Specified by:
getScore
in interfaceCartScoreTier
- Returns:
- score
-
getPrice
Defines a fixed price for the
score
.- Specified by:
getPrice
in interfaceCartScoreTier
- Returns:
- price
-
getPriceFunction
Dynamically calculates a Price for a range of scores.
- Specified by:
getPriceFunction
in interfaceCartScoreTier
- Returns:
- priceFunction
-
getIsMatching
Appears in response to Get ShippingMethods for a Cart if the shipping rate matches the search query.
- Specified by:
getIsMatching
in interfaceCartScoreTier
- Returns:
- isMatching
-
setScore
Description copied from interface:CartScoreTier
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.- Specified by:
setScore
in interfaceCartScoreTier
- Parameters:
score
- value to be set
-
setPrice
Description copied from interface:CartScoreTier
Defines a fixed price for the
score
.- Specified by:
setPrice
in interfaceCartScoreTier
- Parameters:
price
- value to be set
-
setPriceFunction
Description copied from interface:CartScoreTier
Dynamically calculates a Price for a range of scores.
- Specified by:
setPriceFunction
in interfaceCartScoreTier
- Parameters:
priceFunction
- value to be set
-
setIsMatching
Description copied from interface:CartScoreTier
Appears in response to Get ShippingMethods for a Cart if the shipping rate matches the search query.
- Specified by:
setIsMatching
in interfaceCartScoreTier
- Parameters:
isMatching
- value to be set
-
equals
-
hashCode
-