Class CustomLineItemStateTransitionMessagePayloadBuilder
- All Implemented Interfaces:
Builder<CustomLineItemStateTransitionMessagePayload>
Example to create an instance using the builder pattern
CustomLineItemStateTransitionMessagePayload customLineItemStateTransitionMessagePayload = CustomLineItemStateTransitionMessagePayload.builder()
.customLineItemId("{customLineItemId}")
.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 CustomLineItemStateTransitionMessagePayload with checking for non-null required valuesbuilds CustomLineItemStateTransitionMessagePayload without checking for non-null required valuescustomLineItemId
(String customLineItemId) Unique identifier of the Custom Line Item.customLineItemKey
(String customLineItemKey) User-defined unique identifier of the Custom Line Item.fromState
(StateReference fromState) State the Custom Line Item was transitioned from.State the Custom Line Item was transitioned from.Unique identifier of the Custom Line Item.User-defined unique identifier of the Custom Line Item.State the Custom Line Item was transitioned from.Number of Custom Line Items for which the State was transitioned.State the Custom Line Item was transitioned to.Date and time (UTC) the transition of the Custom Line Item State was performed.of()
factory method for an instance of CustomLineItemStateTransitionMessagePayloadBuildercreate builder for CustomLineItemStateTransitionMessagePayload instanceNumber of Custom Line Items for which the State was transitioned.toState
(StateReference toState) State the Custom Line Item was transitioned to.State the Custom Line Item was transitioned to.transitionDate
(ZonedDateTime transitionDate) Date and time (UTC) the transition of the Custom Line Item State was performed.State the Custom Line Item was transitioned from.State the Custom Line Item was transitioned to.
-
Constructor Details
-
CustomLineItemStateTransitionMessagePayloadBuilder
public CustomLineItemStateTransitionMessagePayloadBuilder()
-
-
Method Details
-
customLineItemId
Unique identifier of the Custom Line Item.
- Parameters:
customLineItemId
- value to be set- Returns:
- Builder
-
customLineItemKey
public CustomLineItemStateTransitionMessagePayloadBuilder customLineItemKey(@Nullable String customLineItemKey) User-defined unique identifier of the Custom Line Item.
- Parameters:
customLineItemKey
- value to be set- Returns:
- Builder
-
transitionDate
public CustomLineItemStateTransitionMessagePayloadBuilder transitionDate(ZonedDateTime transitionDate) Date and time (UTC) the transition of the Custom Line Item State was performed.
- Parameters:
transitionDate
- value to be set- Returns:
- Builder
-
quantity
Number of Custom Line Items for which the State was transitioned.
- Parameters:
quantity
- value to be set- Returns:
- Builder
-
fromState
public CustomLineItemStateTransitionMessagePayloadBuilder fromState(Function<StateReferenceBuilder, StateReferenceBuilder> builder) State the Custom Line Item was transitioned from.
- Parameters:
builder
- function to build the fromState value- Returns:
- Builder
-
withFromState
public CustomLineItemStateTransitionMessagePayloadBuilder withFromState(Function<StateReferenceBuilder, StateReference> builder) State the Custom Line Item was transitioned from.
- Parameters:
builder
- function to build the fromState value- Returns:
- Builder
-
fromState
State the Custom Line Item was transitioned from.
- Parameters:
fromState
- value to be set- Returns:
- Builder
-
toState
public CustomLineItemStateTransitionMessagePayloadBuilder toState(Function<StateReferenceBuilder, StateReferenceBuilder> builder) State the Custom Line Item was transitioned to.
- Parameters:
builder
- function to build the toState value- Returns:
- Builder
-
withToState
public CustomLineItemStateTransitionMessagePayloadBuilder withToState(Function<StateReferenceBuilder, StateReference> builder) State the Custom Line Item was transitioned to.
- Parameters:
builder
- function to build the toState value- Returns:
- Builder
-
toState
State the Custom Line Item was transitioned to.
- Parameters:
toState
- value to be set- Returns:
- Builder
-
getCustomLineItemId
Unique identifier of the Custom Line Item.
- Returns:
- customLineItemId
-
getCustomLineItemKey
User-defined unique identifier of the Custom Line Item.
- Returns:
- customLineItemKey
-
getTransitionDate
Date and time (UTC) the transition of the Custom Line Item State was performed.
- Returns:
- transitionDate
-
getQuantity
Number of Custom Line Items for which the State was transitioned.
- Returns:
- quantity
-
getFromState
State the Custom Line Item was transitioned from.
- Returns:
- fromState
-
getToState
State the Custom Line Item was transitioned to.
- Returns:
- toState
-
build
builds CustomLineItemStateTransitionMessagePayload with checking for non-null required values- Specified by:
build
in interfaceBuilder<CustomLineItemStateTransitionMessagePayload>
- Returns:
- CustomLineItemStateTransitionMessagePayload
-
buildUnchecked
builds CustomLineItemStateTransitionMessagePayload without checking for non-null required values- Returns:
- CustomLineItemStateTransitionMessagePayload
-
of
factory method for an instance of CustomLineItemStateTransitionMessagePayloadBuilder- Returns:
- builder
-
of
public static CustomLineItemStateTransitionMessagePayloadBuilder of(CustomLineItemStateTransitionMessagePayload template) create builder for CustomLineItemStateTransitionMessagePayload instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-