Class DiscountedLineItemPriceDraftBuilder
java.lang.Object
com.commercetools.importapi.models.orders.DiscountedLineItemPriceDraftBuilder
- All Implemented Interfaces:
Builder<DiscountedLineItemPriceDraft>
public class DiscountedLineItemPriceDraftBuilder
extends Object
implements Builder<DiscountedLineItemPriceDraft>
DiscountedLineItemPriceDraftBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
DiscountedLineItemPriceDraft discountedLineItemPriceDraft = DiscountedLineItemPriceDraft.builder()
.value(valueBuilder -> valueBuilder)
.plusIncludedDiscounts(includedDiscountsBuilder -> includedDiscountsBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadd the value to the includedDiscounts using the builder functionbuild()
builds DiscountedLineItemPriceDraft with checking for non-null required valuesbuilds DiscountedLineItemPriceDraft without checking for non-null required valuesvalue of includedDiscounts}getValue()
value of value}includedDiscounts
(DiscountedLineItemPortion... includedDiscounts) set values to the includedDiscountsincludedDiscounts
(List<DiscountedLineItemPortion> includedDiscounts) set value to the includedDiscountsof()
factory method for an instance of DiscountedLineItemPriceDraftBuilderof
(DiscountedLineItemPriceDraft template) create builder for DiscountedLineItemPriceDraft instanceplusIncludedDiscounts
(DiscountedLineItemPortion... includedDiscounts) add values to the includedDiscountsplusIncludedDiscounts
(Function<DiscountedLineItemPortionBuilder, DiscountedLineItemPortionBuilder> builder) add the value to the includedDiscounts using the builder functionset the value to the includedDiscounts using the builder functionset the value to the valuevalue
(Function<MoneyBuilder, MoneyBuilder> builder) set the value to the value using the builder functionwithIncludedDiscounts
(Function<DiscountedLineItemPortionBuilder, DiscountedLineItemPortionBuilder> builder) set the value to the includedDiscounts using the builder functionwithValue
(Function<MoneyBuilder, Money> builder) set the value to the value using the builder function
-
Constructor Details
-
DiscountedLineItemPriceDraftBuilder
public DiscountedLineItemPriceDraftBuilder()
-
-
Method Details
-
value
set the value to the value using the builder function- Parameters:
builder
- function to build the value value- Returns:
- Builder
-
withValue
set the value to the value using the builder function- Parameters:
builder
- function to build the value value- Returns:
- Builder
-
value
set the value to the value- Parameters:
value
- value to be set- Returns:
- Builder
-
includedDiscounts
public DiscountedLineItemPriceDraftBuilder includedDiscounts(DiscountedLineItemPortion... includedDiscounts) set values to the includedDiscounts- Parameters:
includedDiscounts
- value to be set- Returns:
- Builder
-
includedDiscounts
public DiscountedLineItemPriceDraftBuilder includedDiscounts(List<DiscountedLineItemPortion> includedDiscounts) set value to the includedDiscounts- Parameters:
includedDiscounts
- value to be set- Returns:
- Builder
-
plusIncludedDiscounts
public DiscountedLineItemPriceDraftBuilder plusIncludedDiscounts(DiscountedLineItemPortion... includedDiscounts) add values to the includedDiscounts- Parameters:
includedDiscounts
- value to be set- Returns:
- Builder
-
plusIncludedDiscounts
public DiscountedLineItemPriceDraftBuilder plusIncludedDiscounts(Function<DiscountedLineItemPortionBuilder, DiscountedLineItemPortionBuilder> builder) add the value to the includedDiscounts using the builder function- Parameters:
builder
- function to build the includedDiscounts value- Returns:
- Builder
-
withIncludedDiscounts
public DiscountedLineItemPriceDraftBuilder withIncludedDiscounts(Function<DiscountedLineItemPortionBuilder, DiscountedLineItemPortionBuilder> builder) set the value to the includedDiscounts using the builder function- Parameters:
builder
- function to build the includedDiscounts value- Returns:
- Builder
-
addIncludedDiscounts
public DiscountedLineItemPriceDraftBuilder addIncludedDiscounts(Function<DiscountedLineItemPortionBuilder, DiscountedLineItemPortion> builder) add the value to the includedDiscounts using the builder function- Parameters:
builder
- function to build the includedDiscounts value- Returns:
- Builder
-
setIncludedDiscounts
public DiscountedLineItemPriceDraftBuilder setIncludedDiscounts(Function<DiscountedLineItemPortionBuilder, DiscountedLineItemPortion> builder) set the value to the includedDiscounts using the builder function- Parameters:
builder
- function to build the includedDiscounts value- Returns:
- Builder
-
getValue
value of value}- Returns:
- value
-
getIncludedDiscounts
value of includedDiscounts}- Returns:
- includedDiscounts
-
build
builds DiscountedLineItemPriceDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<DiscountedLineItemPriceDraft>
- Returns:
- DiscountedLineItemPriceDraft
-
buildUnchecked
builds DiscountedLineItemPriceDraft without checking for non-null required values- Returns:
- DiscountedLineItemPriceDraft
-
of
factory method for an instance of DiscountedLineItemPriceDraftBuilder- Returns:
- builder
-
of
create builder for DiscountedLineItemPriceDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-