Interface ShippingRateDraft
- All Superinterfaces:
Draft<ShippingRateDraft>
ShippingRateDraft
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ShippingRateDraft shippingRateDraft = ShippingRateDraft.builder()
.price(priceBuilder -> priceBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ShippingRateDraftBuilderbuilder()builder factory method for ShippingRateDraftstatic ShippingRateDraftBuilderbuilder(ShippingRateDraft template) create builder for ShippingRateDraft instancecopyDeep()static ShippingRateDraftdeepCopy(ShippingRateDraft template) factory method to create a deep copy of ShippingRateDraft@Valid MoneyFree shipping is applied if the sum of the (Custom) Line Item Prices reaches the specified value.@NotNull @Valid MoneygetPrice()Money value of the ShippingRate.@Valid List<ShippingRatePriceTier>getTiers()Price tiers for the ShippingRate.static ShippingRateDraftof()factory methodstatic ShippingRateDraftof(ShippingRateDraft template) factory method to create a shallow copy ShippingRateDraftvoidsetFreeAbove(Money freeAbove) Free shipping is applied if the sum of the (Custom) Line Item Prices reaches the specified value.voidMoney value 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<ShippingRateDraft>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithShippingRateDraft(Function<ShippingRateDraft, T> helper) accessor map function
-
Method Details
-
getPrice
Money value 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
-
getTiers
Price tiers for the ShippingRate.
- Returns:
- tiers
-
setPrice
Money value 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
-
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 ShippingRateDraft
-
of
factory method to create a shallow copy ShippingRateDraft- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
ShippingRateDraft copyDeep() -
deepCopy
factory method to create a deep copy of ShippingRateDraft- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ShippingRateDraft- Returns:
- builder
-
builder
create builder for ShippingRateDraft instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withShippingRateDraft
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
-