Class OrderLineItemAddedMessagePayloadBuilder
java.lang.Object
com.commercetools.api.models.message.OrderLineItemAddedMessagePayloadBuilder
- All Implemented Interfaces:
Builder<OrderLineItemAddedMessagePayload>
public class OrderLineItemAddedMessagePayloadBuilder
extends Object
implements Builder<OrderLineItemAddedMessagePayload>
OrderLineItemAddedMessagePayloadBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
OrderLineItemAddedMessagePayload orderLineItemAddedMessagePayload = OrderLineItemAddedMessagePayload.builder()
.lineItem(lineItemBuilder -> lineItemBuilder)
.addedQuantity(0.3)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddedQuantity
(Long addedQuantity) Quantity of Line Items that were added to the Order.build()
builds OrderLineItemAddedMessagePayload with checking for non-null required valuesbuilds OrderLineItemAddedMessagePayload without checking for non-null required valuesQuantity of Line Items that were added to the Order.Line Item that was added to the Order.Line Item that was added to the Order.lineItem
(Function<LineItemBuilder, LineItemBuilder> builder) Line Item that was added to the Order.of()
factory method for an instance of OrderLineItemAddedMessagePayloadBuilderof
(OrderLineItemAddedMessagePayload template) create builder for OrderLineItemAddedMessagePayload instancewithLineItem
(Function<LineItemBuilder, LineItem> builder) Line Item that was added to the Order.
-
Constructor Details
-
OrderLineItemAddedMessagePayloadBuilder
public OrderLineItemAddedMessagePayloadBuilder()
-
-
Method Details
-
lineItem
public OrderLineItemAddedMessagePayloadBuilder lineItem(Function<LineItemBuilder, LineItemBuilder> builder) Line Item that was added to the Order.
- Parameters:
builder
- function to build the lineItem value- Returns:
- Builder
-
withLineItem
public OrderLineItemAddedMessagePayloadBuilder withLineItem(Function<LineItemBuilder, LineItem> builder) Line Item that was added to the Order.
- Parameters:
builder
- function to build the lineItem value- Returns:
- Builder
-
lineItem
Line Item that was added to the Order.
- Parameters:
lineItem
- value to be set- Returns:
- Builder
-
addedQuantity
Quantity of Line Items that were added to the Order.
- Parameters:
addedQuantity
- value to be set- Returns:
- Builder
-
getLineItem
Line Item that was added to the Order.
- Returns:
- lineItem
-
getAddedQuantity
Quantity of Line Items that were added to the Order.
- Returns:
- addedQuantity
-
build
builds OrderLineItemAddedMessagePayload with checking for non-null required values- Specified by:
build
in interfaceBuilder<OrderLineItemAddedMessagePayload>
- Returns:
- OrderLineItemAddedMessagePayload
-
buildUnchecked
builds OrderLineItemAddedMessagePayload without checking for non-null required values- Returns:
- OrderLineItemAddedMessagePayload
-
of
factory method for an instance of OrderLineItemAddedMessagePayloadBuilder- Returns:
- builder
-
of
create builder for OrderLineItemAddedMessagePayload instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-