Class ShippingRateDraftBuilder
java.lang.Object
com.commercetools.importapi.models.orders.ShippingRateDraftBuilder
- All Implemented Interfaces:
Builder<ShippingRateDraft>
ShippingRateDraftBuilder
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()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ShippingRateDraft with checking for non-null required valuesbuilds ShippingRateDraft without checking for non-null required valuesset the value to the freeAbovefreeAbove
(Function<MoneyBuilder, MoneyBuilder> builder) set the value to the freeAbove using the builder functionvalue of freeAbove}getPrice()
value of price}getTiers()
value of tiers}static ShippingRateDraftBuilder
of()
factory method for an instance of ShippingRateDraftBuilderstatic ShippingRateDraftBuilder
of
(ShippingRateDraft template) create builder for ShippingRateDraft instanceplusTiers
(ShippingRatePriceTier... tiers) add values to the tiersplusTiers
(Function<ShippingRatePriceTierBuilder, Builder<? extends ShippingRatePriceTier>> builder) add a value to the tiers using the builder functionset the value to the priceprice
(Function<MoneyBuilder, MoneyBuilder> builder) set the value to the price using the builder functiontiers
(ShippingRatePriceTier... tiers) set values to the tierstiers
(List<ShippingRatePriceTier> tiers) set value to the tierswithFreeAbove
(Function<MoneyBuilder, Money> builder) set the value to the freeAbove using the builder functionwithPrice
(Function<MoneyBuilder, Money> builder) set the value to the price using the builder functionwithTiers
(Function<ShippingRatePriceTierBuilder, Builder<? extends ShippingRatePriceTier>> builder) set the value to the tiers using the builder function
-
Constructor Details
-
ShippingRateDraftBuilder
public ShippingRateDraftBuilder()
-
-
Method Details
-
price
set the value to the price using the builder function- Parameters:
builder
- function to build the price value- Returns:
- Builder
-
withPrice
set the value to the price using the builder function- Parameters:
builder
- function to build the price value- Returns:
- Builder
-
price
set the value to the price- Parameters:
price
- value to be set- Returns:
- Builder
-
freeAbove
set the value to the freeAbove using the builder function- Parameters:
builder
- function to build the freeAbove value- Returns:
- Builder
-
withFreeAbove
set the value to the freeAbove using the builder function- Parameters:
builder
- function to build the freeAbove value- Returns:
- Builder
-
freeAbove
set the value to the freeAbove- Parameters:
freeAbove
- value to be set- Returns:
- Builder
-
tiers
set values to the tiers- Parameters:
tiers
- value to be set- Returns:
- Builder
-
tiers
set value to the tiers- Parameters:
tiers
- value to be set- Returns:
- Builder
-
plusTiers
add values to the tiers- Parameters:
tiers
- value to be set- Returns:
- Builder
-
plusTiers
public ShippingRateDraftBuilder plusTiers(Function<ShippingRatePriceTierBuilder, Builder<? extends ShippingRatePriceTier>> builder) add a value to the tiers using the builder function- Parameters:
builder
- function to build the tiers value- Returns:
- Builder
-
withTiers
public ShippingRateDraftBuilder withTiers(Function<ShippingRatePriceTierBuilder, Builder<? extends ShippingRatePriceTier>> builder) set the value to the tiers using the builder function- Parameters:
builder
- function to build the tiers value- Returns:
- Builder
-
getPrice
value of price}- Returns:
- price
-
getFreeAbove
value of freeAbove}- Returns:
- freeAbove
-
getTiers
value of tiers}- Returns:
- tiers
-
build
builds ShippingRateDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<ShippingRateDraft>
- Returns:
- ShippingRateDraft
-
buildUnchecked
builds ShippingRateDraft without checking for non-null required values- Returns:
- ShippingRateDraft
-
of
factory method for an instance of ShippingRateDraftBuilder- Returns:
- builder
-
of
create builder for ShippingRateDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-