Class LineItemStateTransitionMessagePayloadBuilder
- All Implemented Interfaces:
Builder<LineItemStateTransitionMessagePayload>
Example to create an instance using the builder pattern
LineItemStateTransitionMessagePayload lineItemStateTransitionMessagePayload = LineItemStateTransitionMessagePayload.builder()
.lineItemId("{lineItemId}")
.transitionDate(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.quantity(0.3)
.fromState(fromStateBuilder -> fromStateBuilder)
.toState(toStateBuilder -> toStateBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds LineItemStateTransitionMessagePayload with checking for non-null required valuesbuilds LineItemStateTransitionMessagePayload without checking for non-null required valuesfromState
(StateReference fromState) State the Line Item was transitioned from.State the Line Item was transitioned from.State the Line Item was transitioned from.Unique identifier of the Line Item.User-defined unique identifier of the LineItem.Number of Line Items for which the State was transitioned.State the Line Item was transitioned to.Date and time (UTC) the transition of the Line Item State was performed.lineItemId
(String lineItemId) Unique identifier of the Line Item.lineItemKey
(String lineItemKey) User-defined unique identifier of the LineItem.of()
factory method for an instance of LineItemStateTransitionMessagePayloadBuilderof
(LineItemStateTransitionMessagePayload template) create builder for LineItemStateTransitionMessagePayload instanceNumber of Line Items for which the State was transitioned.toState
(StateReference toState) State the Line Item was transitioned to.State the Line Item was transitioned to.transitionDate
(ZonedDateTime transitionDate) Date and time (UTC) the transition of the Line Item State was performed.State the Line Item was transitioned from.State the Line Item was transitioned to.
-
Constructor Details
-
LineItemStateTransitionMessagePayloadBuilder
public LineItemStateTransitionMessagePayloadBuilder()
-
-
Method Details
-
lineItemId
Unique identifier of the Line Item.
- Parameters:
lineItemId
- value to be set- Returns:
- Builder
-
lineItemKey
User-defined unique identifier of the LineItem.
- Parameters:
lineItemKey
- value to be set- Returns:
- Builder
-
transitionDate
Date and time (UTC) the transition of the Line Item State was performed.
- Parameters:
transitionDate
- value to be set- Returns:
- Builder
-
quantity
Number of Line Items for which the State was transitioned.
- Parameters:
quantity
- value to be set- Returns:
- Builder
-
fromState
public LineItemStateTransitionMessagePayloadBuilder fromState(Function<StateReferenceBuilder, StateReferenceBuilder> builder) State the Line Item was transitioned from.
- Parameters:
builder
- function to build the fromState value- Returns:
- Builder
-
withFromState
public LineItemStateTransitionMessagePayloadBuilder withFromState(Function<StateReferenceBuilder, StateReference> builder) State the Line Item was transitioned from.
- Parameters:
builder
- function to build the fromState value- Returns:
- Builder
-
fromState
State the Line Item was transitioned from.
- Parameters:
fromState
- value to be set- Returns:
- Builder
-
toState
public LineItemStateTransitionMessagePayloadBuilder toState(Function<StateReferenceBuilder, StateReferenceBuilder> builder) State the Line Item was transitioned to.
- Parameters:
builder
- function to build the toState value- Returns:
- Builder
-
withToState
public LineItemStateTransitionMessagePayloadBuilder withToState(Function<StateReferenceBuilder, StateReference> builder) State the Line Item was transitioned to.
- Parameters:
builder
- function to build the toState value- Returns:
- Builder
-
toState
State the Line Item was transitioned to.
- Parameters:
toState
- value to be set- Returns:
- Builder
-
getLineItemId
Unique identifier of the Line Item.
- Returns:
- lineItemId
-
getLineItemKey
User-defined unique identifier of the LineItem.
- Returns:
- lineItemKey
-
getTransitionDate
Date and time (UTC) the transition of the Line Item State was performed.
- Returns:
- transitionDate
-
getQuantity
Number of Line Items for which the State was transitioned.
- Returns:
- quantity
-
getFromState
State the Line Item was transitioned from.
- Returns:
- fromState
-
getToState
State the Line Item was transitioned to.
- Returns:
- toState
-
build
builds LineItemStateTransitionMessagePayload with checking for non-null required values- Specified by:
build
in interfaceBuilder<LineItemStateTransitionMessagePayload>
- Returns:
- LineItemStateTransitionMessagePayload
-
buildUnchecked
builds LineItemStateTransitionMessagePayload without checking for non-null required values- Returns:
- LineItemStateTransitionMessagePayload
-
of
factory method for an instance of LineItemStateTransitionMessagePayloadBuilder- Returns:
- builder
-
of
public static LineItemStateTransitionMessagePayloadBuilder of(LineItemStateTransitionMessagePayload template) create builder for LineItemStateTransitionMessagePayload instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-