Interface ItemShippingDetails
public interface ItemShippingDetails
ItemShippingDetails
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ItemShippingDetails itemShippingDetails = ItemShippingDetails.builder()
.plusTargets(targetsBuilder -> targetsBuilder)
.valid(true)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ItemShippingDetailsBuilder
builder()
builder factory method for ItemShippingDetailsstatic ItemShippingDetailsBuilder
builder
(ItemShippingDetails template) create builder for ItemShippingDetails instancestatic ItemShippingDetails
deepCopy
(ItemShippingDetails template) factory method to create a deep copy of ItemShippingDetails@NotNull @Valid List<ItemShippingTarget>
@NotNull Boolean
getValid()
true if the quantity of the (custom) line item is equal to the sum of the sub-quantities intargets
,false
otherwise.static ItemShippingDetails
of()
factory methodstatic ItemShippingDetails
of
(ItemShippingDetails template) factory method to create a shallow copy ItemShippingDetailsvoid
setTargets
(ItemShippingTarget... targets) set targetsvoid
setTargets
(List<ItemShippingTarget> targets) set targetsvoid
true if the quantity of the (custom) line item is equal to the sum of the sub-quantities intargets
,false
otherwise.static com.fasterxml.jackson.core.type.TypeReference<ItemShippingDetails>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withItemShippingDetails
(Function<ItemShippingDetails, T> helper) accessor map function
-
Method Details
-
getTargets
- Returns:
- targets
-
getValid
true if the quantity of the (custom) line item is equal to the sum of the sub-quantities in
targets
,false
otherwise. A cart cannot be ordered when the value isfalse
. The error InvalidItemShippingDetails will be triggered.- Returns:
- valid
-
setTargets
set targets- Parameters:
targets
- values to be set
-
setTargets
set targets- Parameters:
targets
- values to be set
-
setValid
true if the quantity of the (custom) line item is equal to the sum of the sub-quantities in
targets
,false
otherwise. A cart cannot be ordered when the value isfalse
. The error InvalidItemShippingDetails will be triggered.- Parameters:
valid
- value to be set
-
of
factory method- Returns:
- instance of ItemShippingDetails
-
of
factory method to create a shallow copy ItemShippingDetails- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of ItemShippingDetails- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ItemShippingDetails- Returns:
- builder
-
builder
create builder for ItemShippingDetails instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withItemShippingDetails
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
-