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)
.freeAbove(freeAboveBuilder -> freeAboveBuilder)
.isMatching(true)
.plusTiers(tiersBuilder -> tiersBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ShippingRateBuilder
builder()
builder factory method for ShippingRatestatic ShippingRateBuilder
builder
(ShippingRate template) create builder for ShippingRate instancestatic ShippingRate
deepCopy
(ShippingRate template) factory method to create a deep copy of ShippingRate@NotNull @Valid Money
@NotNull Boolean
Only appears in response to requests for ShippingMethods by Cart or location to mark this shipping rate as one that matches the Cart or location.@NotNull @Valid Money
getPrice()
@NotNull @Valid List<ShippingRatePriceTier>
getTiers()
static ShippingRate
of()
factory methodstatic ShippingRate
of
(ShippingRate template) factory method to create a shallow copy ShippingRatevoid
setFreeAbove
(Money freeAbove) set freeAbovevoid
setIsMatching
(Boolean isMatching) Only appears in response to requests for ShippingMethods by Cart or location to mark this shipping rate as one that matches the Cart or location.void
set pricevoid
setTiers
(ShippingRatePriceTier... tiers) set tiersvoid
setTiers
(List<ShippingRatePriceTier> tiers) set tiersstatic com.fasterxml.jackson.core.type.TypeReference<ShippingRate>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withShippingRate
(Function<ShippingRate, T> helper) accessor map function
-
Method Details
-
getPrice
- Returns:
- price
-
getFreeAbove
- Returns:
- freeAbove
-
getIsMatching
Only appears in response to requests for ShippingMethods by Cart or location to mark this shipping rate as one that matches the Cart or location.
- Returns:
- isMatching
-
getTiers
- Returns:
- tiers
-
setPrice
set price- Parameters:
price
- value to be set
-
setFreeAbove
set freeAbove- Parameters:
freeAbove
- value to be set
-
setIsMatching
Only appears in response to requests for ShippingMethods by Cart or location to mark this shipping rate as one that matches the Cart or location.
- Parameters:
isMatching
- value to be set
-
setTiers
set tiers- Parameters:
tiers
- values to be set
-
setTiers
set tiers- 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
-
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
-