Class ItemShippingDetailsBuilder
- All Implemented Interfaces:
Builder<ItemShippingDetails>
Example to create an instance using the builder pattern
ItemShippingDetails itemShippingDetails = ItemShippingDetails.builder()
.plusTargets(targetsBuilder -> targetsBuilder)
.valid(true)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionHolds information on the quantity of Line Items or Custom Line Items and the address it is shipped.build()
builds ItemShippingDetails with checking for non-null required valuesbuilds ItemShippingDetails without checking for non-null required valuesHolds information on the quantity of Line Items or Custom Line Items and the address it is shipped.getValid()
true
if the quantity of Line Items or Custom Line Items is equal to the sum of sub-quantities defined intargets
.false
if the quantity of Line Items or Custom Line Items is not equal to the sum of sub-quantities defined intargets
.static ItemShippingDetailsBuilder
of()
factory method for an instance of ItemShippingDetailsBuilderstatic ItemShippingDetailsBuilder
of
(ItemShippingDetails template) create builder for ItemShippingDetails instanceplusTargets
(ItemShippingTarget... targets) Holds information on the quantity of Line Items or Custom Line Items and the address it is shipped.Holds information on the quantity of Line Items or Custom Line Items and the address it is shipped.Holds information on the quantity of Line Items or Custom Line Items and the address it is shipped.targets
(ItemShippingTarget... targets) Holds information on the quantity of Line Items or Custom Line Items and the address it is shipped.targets
(List<ItemShippingTarget> targets) Holds information on the quantity of Line Items or Custom Line Items and the address it is shipped.true
if the quantity of Line Items or Custom Line Items is equal to the sum of sub-quantities defined intargets
.false
if the quantity of Line Items or Custom Line Items is not equal to the sum of sub-quantities defined intargets
.Holds information on the quantity of Line Items or Custom Line Items and the address it is shipped.
-
Constructor Details
-
ItemShippingDetailsBuilder
public ItemShippingDetailsBuilder()
-
-
Method Details
-
targets
Holds information on the quantity of Line Items or Custom Line Items and the address it is shipped.
- Parameters:
targets
- value to be set- Returns:
- Builder
-
targets
Holds information on the quantity of Line Items or Custom Line Items and the address it is shipped.
- Parameters:
targets
- value to be set- Returns:
- Builder
-
plusTargets
Holds information on the quantity of Line Items or Custom Line Items and the address it is shipped.
- Parameters:
targets
- value to be set- Returns:
- Builder
-
plusTargets
public ItemShippingDetailsBuilder plusTargets(Function<ItemShippingTargetBuilder, ItemShippingTargetBuilder> builder) Holds information on the quantity of Line Items or Custom Line Items and the address it is shipped.
- Parameters:
builder
- function to build the targets value- Returns:
- Builder
-
withTargets
public ItemShippingDetailsBuilder withTargets(Function<ItemShippingTargetBuilder, ItemShippingTargetBuilder> builder) Holds information on the quantity of Line Items or Custom Line Items and the address it is shipped.
- Parameters:
builder
- function to build the targets value- Returns:
- Builder
-
addTargets
public ItemShippingDetailsBuilder addTargets(Function<ItemShippingTargetBuilder, ItemShippingTarget> builder) Holds information on the quantity of Line Items or Custom Line Items and the address it is shipped.
- Parameters:
builder
- function to build the targets value- Returns:
- Builder
-
setTargets
public ItemShippingDetailsBuilder setTargets(Function<ItemShippingTargetBuilder, ItemShippingTarget> builder) Holds information on the quantity of Line Items or Custom Line Items and the address it is shipped.
- Parameters:
builder
- function to build the targets value- Returns:
- Builder
-
valid
true
if the quantity of Line Items or Custom Line Items is equal to the sum of sub-quantities defined intargets
.false
if the quantity of Line Items or Custom Line Items is not equal to the sum of sub-quantities defined intargets
. Ordering a Cart when the value isfalse
returns an InvalidItemShippingDetails error.
- Parameters:
valid
- value to be set- Returns:
- Builder
-
getTargets
Holds information on the quantity of Line Items or Custom Line Items and the address it is shipped.
- Returns:
- targets
-
getValid
true
if the quantity of Line Items or Custom Line Items is equal to the sum of sub-quantities defined intargets
.false
if the quantity of Line Items or Custom Line Items is not equal to the sum of sub-quantities defined intargets
. Ordering a Cart when the value isfalse
returns an InvalidItemShippingDetails error.
- Returns:
- valid
-
build
builds ItemShippingDetails with checking for non-null required values- Specified by:
build
in interfaceBuilder<ItemShippingDetails>
- Returns:
- ItemShippingDetails
-
buildUnchecked
builds ItemShippingDetails without checking for non-null required values- Returns:
- ItemShippingDetails
-
of
factory method for an instance of ItemShippingDetailsBuilder- Returns:
- builder
-
of
create builder for ItemShippingDetails instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-