Interface ShippingRate
public interface ShippingRate
ShippingRate
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ShippingRate shippingRate = ShippingRate.builder()
.price(priceBuilder -> priceBuilder)
.plusTiers(tiersBuilder -> tiersBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ShippingRateBuilderbuilder()builder factory method for ShippingRatestatic ShippingRateBuilderbuilder(ShippingRate template) create builder for ShippingRate instancecopyDeep()static ShippingRatedeepCopy(ShippingRate template) factory method to create a deep copy of ShippingRate@Valid CentPrecisionMoneyFree shipping is applied if the sum of the (Custom) Line Item Prices reaches the specified value.@NotNull @Valid CentPrecisionMoneygetPrice()Currency amount of the ShippingRate.@NotNull @Valid List<ShippingRatePriceTier>getTiers()Price tiers for the ShippingRate.static ShippingRateof()factory methodstatic ShippingRateof(ShippingRate template) factory method to create a shallow copy ShippingRatevoidsetFreeAbove(CentPrecisionMoney freeAbove) Free shipping is applied if the sum of the (Custom) Line Item Prices reaches the specified value.voidsetIsMatching(Boolean isMatching) voidsetPrice(CentPrecisionMoney price) Currency amount of the ShippingRate.voidsetTiers(ShippingRatePriceTier... tiers) Price tiers for the ShippingRate.voidsetTiers(List<ShippingRatePriceTier> tiers) Price tiers for the ShippingRate.static com.fasterxml.jackson.core.type.TypeReference<ShippingRate>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithShippingRate(Function<ShippingRate, T> helper) accessor map function
-
Method Details
-
getPrice
Currency amount of the ShippingRate.
- Returns:
- price
-
getFreeAbove
Free shipping is applied if the sum of the (Custom) Line Item Prices reaches the specified value.
- Returns:
- freeAbove
-
getIsMatching
Boolean getIsMatching()trueif the ShippingRate matches given Cart or Location. Only appears in response to requests for Get ShippingMethods for a Cart or Get ShippingMethods for a Location.- Returns:
- isMatching
-
getTiers
Price tiers for the ShippingRate.
- Returns:
- tiers
-
setPrice
Currency amount of the ShippingRate.
- Parameters:
price- value to be set
-
setFreeAbove
Free shipping is applied if the sum of the (Custom) Line Item Prices reaches the specified value.
- Parameters:
freeAbove- value to be set
-
setIsMatching
trueif the ShippingRate matches given Cart or Location. Only appears in response to requests for Get ShippingMethods for a Cart or Get ShippingMethods for a Location.- Parameters:
isMatching- value to be set
-
setTiers
Price tiers for the ShippingRate.
- Parameters:
tiers- values to be set
-
setTiers
Price tiers for the ShippingRate.
- Parameters:
tiers- values to be set
-
of
factory method- Returns:
- instance of ShippingRate
-
of
factory method to create a shallow copy ShippingRate- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
ShippingRate copyDeep() -
deepCopy
factory method to create a deep copy of ShippingRate- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ShippingRate- Returns:
- builder
-
builder
create builder for ShippingRate instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withShippingRate
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
-