Class OrderLineItemRemovedMessageBuilder
- All Implemented Interfaces:
Builder<OrderLineItemRemovedMessage>
Example to create an instance using the builder pattern
OrderLineItemRemovedMessage orderLineItemRemovedMessage = OrderLineItemRemovedMessage.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.sequenceNumber(0.3)
.resource(resourceBuilder -> resourceBuilder)
.resourceVersion(0.3)
.lineItemId("{lineItemId}")
.removedQuantity(0.3)
.newQuantity(0.3)
.plusNewState(newStateBuilder -> newStateBuilder)
.newTotalPrice(newTotalPriceBuilder -> newTotalPriceBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddNewState
(Function<ItemStateBuilder, ItemState> builder) ItemStates after the Remove LineItem update action.build()
builds OrderLineItemRemovedMessage with checking for non-null required valuesbuilds OrderLineItemRemovedMessage without checking for non-null required valuescreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the Message was generated.IDs and references that created the Message.createdBy
(Function<CreatedByBuilder, CreatedByBuilder> builder) IDs and references that created the Message.Date and time (UTC) the Message was generated.IDs and references that created the Message.getId()
Unique identifier of the Message.Value ofcreatedAt
.IDs and references that last modified the Message.Unique identifier of the Line Item.User-defined unique identifier of the LineItem.Price of the Order after the Remove LineItem update action.Line Item quantity after the Remove LineItem update action.Shipping Details of the Order after the Remove LineItem update action.ItemStates after the Remove LineItem update action.TaxedItemPrice of the Order after the Remove LineItem update action.totalPrice
of the Order after the Remove LineItem update action.Quantity of Line Items that were removed during the Remove LineItem update action.Reference to the resource on which the change or action was performed.User-provided identifiers of the resource, such askey
orexternalId
.Version of the resource on which the change or action was performed.Message number in relation to other Messages for a given resource.Version of a resource.Unique identifier of the Message.lastModifiedAt
(ZonedDateTime lastModifiedAt) Value ofcreatedAt
.lastModifiedBy
(LastModifiedBy lastModifiedBy) IDs and references that last modified the Message.IDs and references that last modified the Message.lineItemId
(String lineItemId) Unique identifier of the Line Item.lineItemKey
(String lineItemKey) User-defined unique identifier of the LineItem.Price of the Order after the Remove LineItem update action.newPrice
(Function<PriceBuilder, PriceBuilder> builder) Price of the Order after the Remove LineItem update action.newQuantity
(Long newQuantity) Line Item quantity after the Remove LineItem update action.newShippingDetail
(ItemShippingDetails newShippingDetail) Shipping Details of the Order after the Remove LineItem update action.Shipping Details of the Order after the Remove LineItem update action.ItemStates after the Remove LineItem update action.ItemStates after the Remove LineItem update action.newTaxedPrice
(TaxedItemPrice newTaxedPrice) TaxedItemPrice of the Order after the Remove LineItem update action.TaxedItemPrice of the Order after the Remove LineItem update action.newTotalPrice
(CentPrecisionMoney newTotalPrice) totalPrice
of the Order after the Remove LineItem update action.totalPrice
of the Order after the Remove LineItem update action.of()
factory method for an instance of OrderLineItemRemovedMessageBuilderof
(OrderLineItemRemovedMessage template) create builder for OrderLineItemRemovedMessage instanceplusNewState
(ItemState... newState) ItemStates after the Remove LineItem update action.plusNewState
(Function<ItemStateBuilder, ItemStateBuilder> builder) ItemStates after the Remove LineItem update action.removedQuantity
(Long removedQuantity) Quantity of Line Items that were removed during the Remove LineItem update action.Reference to the resource on which the change or action was performed.resource
(Function<ReferenceBuilder, Builder<? extends Reference>> builder) Reference to the resource on which the change or action was performed.resourceUserProvidedIdentifiers
(UserProvidedIdentifiers resourceUserProvidedIdentifiers) User-provided identifiers of the resource, such askey
orexternalId
.resourceUserProvidedIdentifiers
(Function<UserProvidedIdentifiersBuilder, UserProvidedIdentifiersBuilder> builder) User-provided identifiers of the resource, such askey
orexternalId
.resourceVersion
(Long resourceVersion) Version of the resource on which the change or action was performed.sequenceNumber
(Long sequenceNumber) Message number in relation to other Messages for a given resource.setNewState
(Function<ItemStateBuilder, ItemState> builder) ItemStates after the Remove LineItem update action.Version of a resource.withCreatedBy
(Function<CreatedByBuilder, CreatedBy> builder) IDs and references that created the Message.IDs and references that last modified the Message.withNewPrice
(Function<PriceBuilder, Price> builder) Price of the Order after the Remove LineItem update action.Shipping Details of the Order after the Remove LineItem update action.withNewState
(Function<ItemStateBuilder, ItemStateBuilder> builder) ItemStates after the Remove LineItem update action.TaxedItemPrice of the Order after the Remove LineItem update action.totalPrice
of the Order after the Remove LineItem update action.withResourceUserProvidedIdentifiers
(Function<UserProvidedIdentifiersBuilder, UserProvidedIdentifiers> builder) User-provided identifiers of the resource, such askey
orexternalId
.
-
Constructor Details
-
OrderLineItemRemovedMessageBuilder
public OrderLineItemRemovedMessageBuilder()
-
-
Method Details
-
id
Unique identifier of the Message. Can be used to track which Messages have been processed.
- Parameters:
id
- value to be set- Returns:
- Builder
-
version
Version of a resource. In case of Messages, this is always
1
.- Parameters:
version
- value to be set- Returns:
- Builder
-
createdAt
Date and time (UTC) the Message was generated.
- Parameters:
createdAt
- value to be set- Returns:
- Builder
-
lastModifiedAt
Value of
createdAt
.- Parameters:
lastModifiedAt
- value to be set- Returns:
- Builder
-
lastModifiedBy
public OrderLineItemRemovedMessageBuilder lastModifiedBy(Function<LastModifiedByBuilder, LastModifiedByBuilder> builder) IDs and references that last modified the Message.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
withLastModifiedBy
public OrderLineItemRemovedMessageBuilder withLastModifiedBy(Function<LastModifiedByBuilder, LastModifiedBy> builder) IDs and references that last modified the Message.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
lastModifiedBy
IDs and references that last modified the Message.
- Parameters:
lastModifiedBy
- value to be set- Returns:
- Builder
-
createdBy
public OrderLineItemRemovedMessageBuilder createdBy(Function<CreatedByBuilder, CreatedByBuilder> builder) IDs and references that created the Message.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
withCreatedBy
public OrderLineItemRemovedMessageBuilder withCreatedBy(Function<CreatedByBuilder, CreatedBy> builder) IDs and references that created the Message.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
createdBy
IDs and references that created the Message.
- Parameters:
createdBy
- value to be set- Returns:
- Builder
-
sequenceNumber
Message number in relation to other Messages for a given resource. The
sequenceNumber
of the next Message for the resource is the successor of thesequenceNumber
of the current Message. Meaning, thesequenceNumber
of the next Message equals thesequenceNumber
of the current Message + 1.sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.- Parameters:
sequenceNumber
- value to be set- Returns:
- Builder
-
resource
Reference to the resource on which the change or action was performed.
- Parameters:
resource
- value to be set- Returns:
- Builder
-
resource
public OrderLineItemRemovedMessageBuilder resource(Function<ReferenceBuilder, Builder<? extends Reference>> builder) Reference to the resource on which the change or action was performed.
- Parameters:
builder
- function to build the resource value- Returns:
- Builder
-
resourceVersion
Version of the resource on which the change or action was performed.
- Parameters:
resourceVersion
- value to be set- Returns:
- Builder
-
resourceUserProvidedIdentifiers
public OrderLineItemRemovedMessageBuilder resourceUserProvidedIdentifiers(Function<UserProvidedIdentifiersBuilder, UserProvidedIdentifiersBuilder> builder) User-provided identifiers of the resource, such as
key
orexternalId
. Only present if the resource has such identifiers.- Parameters:
builder
- function to build the resourceUserProvidedIdentifiers value- Returns:
- Builder
-
withResourceUserProvidedIdentifiers
public OrderLineItemRemovedMessageBuilder withResourceUserProvidedIdentifiers(Function<UserProvidedIdentifiersBuilder, UserProvidedIdentifiers> builder) User-provided identifiers of the resource, such as
key
orexternalId
. Only present if the resource has such identifiers.- Parameters:
builder
- function to build the resourceUserProvidedIdentifiers value- Returns:
- Builder
-
resourceUserProvidedIdentifiers
public OrderLineItemRemovedMessageBuilder resourceUserProvidedIdentifiers(@Nullable UserProvidedIdentifiers resourceUserProvidedIdentifiers) User-provided identifiers of the resource, such as
key
orexternalId
. Only present if the resource has such identifiers.- Parameters:
resourceUserProvidedIdentifiers
- value to be set- Returns:
- Builder
-
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
-
removedQuantity
Quantity of Line Items that were removed during the Remove LineItem update action.
- Parameters:
removedQuantity
- value to be set- Returns:
- Builder
-
newQuantity
Line Item quantity after the Remove LineItem update action.
- Parameters:
newQuantity
- value to be set- Returns:
- Builder
-
newState
ItemStates after the Remove LineItem update action.
- Parameters:
newState
- value to be set- Returns:
- Builder
-
newState
ItemStates after the Remove LineItem update action.
- Parameters:
newState
- value to be set- Returns:
- Builder
-
plusNewState
ItemStates after the Remove LineItem update action.
- Parameters:
newState
- value to be set- Returns:
- Builder
-
plusNewState
public OrderLineItemRemovedMessageBuilder plusNewState(Function<ItemStateBuilder, ItemStateBuilder> builder) ItemStates after the Remove LineItem update action.
- Parameters:
builder
- function to build the newState value- Returns:
- Builder
-
withNewState
public OrderLineItemRemovedMessageBuilder withNewState(Function<ItemStateBuilder, ItemStateBuilder> builder) ItemStates after the Remove LineItem update action.
- Parameters:
builder
- function to build the newState value- Returns:
- Builder
-
addNewState
ItemStates after the Remove LineItem update action.
- Parameters:
builder
- function to build the newState value- Returns:
- Builder
-
setNewState
ItemStates after the Remove LineItem update action.
- Parameters:
builder
- function to build the newState value- Returns:
- Builder
-
newTotalPrice
public OrderLineItemRemovedMessageBuilder newTotalPrice(Function<CentPrecisionMoneyBuilder, CentPrecisionMoneyBuilder> builder) totalPrice
of the Order after the Remove LineItem update action.- Parameters:
builder
- function to build the newTotalPrice value- Returns:
- Builder
-
withNewTotalPrice
public OrderLineItemRemovedMessageBuilder withNewTotalPrice(Function<CentPrecisionMoneyBuilder, CentPrecisionMoney> builder) totalPrice
of the Order after the Remove LineItem update action.- Parameters:
builder
- function to build the newTotalPrice value- Returns:
- Builder
-
newTotalPrice
totalPrice
of the Order after the Remove LineItem update action.- Parameters:
newTotalPrice
- value to be set- Returns:
- Builder
-
newTaxedPrice
public OrderLineItemRemovedMessageBuilder newTaxedPrice(Function<TaxedItemPriceBuilder, TaxedItemPriceBuilder> builder) TaxedItemPrice of the Order after the Remove LineItem update action.
- Parameters:
builder
- function to build the newTaxedPrice value- Returns:
- Builder
-
withNewTaxedPrice
public OrderLineItemRemovedMessageBuilder withNewTaxedPrice(Function<TaxedItemPriceBuilder, TaxedItemPrice> builder) TaxedItemPrice of the Order after the Remove LineItem update action.
- Parameters:
builder
- function to build the newTaxedPrice value- Returns:
- Builder
-
newTaxedPrice
TaxedItemPrice of the Order after the Remove LineItem update action.
- Parameters:
newTaxedPrice
- value to be set- Returns:
- Builder
-
newPrice
Price of the Order after the Remove LineItem update action.
- Parameters:
builder
- function to build the newPrice value- Returns:
- Builder
-
withNewPrice
Price of the Order after the Remove LineItem update action.
- Parameters:
builder
- function to build the newPrice value- Returns:
- Builder
-
newPrice
Price of the Order after the Remove LineItem update action.
- Parameters:
newPrice
- value to be set- Returns:
- Builder
-
newShippingDetail
public OrderLineItemRemovedMessageBuilder newShippingDetail(Function<ItemShippingDetailsBuilder, ItemShippingDetailsBuilder> builder) Shipping Details of the Order after the Remove LineItem update action.
- Parameters:
builder
- function to build the newShippingDetail value- Returns:
- Builder
-
withNewShippingDetail
public OrderLineItemRemovedMessageBuilder withNewShippingDetail(Function<ItemShippingDetailsBuilder, ItemShippingDetails> builder) Shipping Details of the Order after the Remove LineItem update action.
- Parameters:
builder
- function to build the newShippingDetail value- Returns:
- Builder
-
newShippingDetail
public OrderLineItemRemovedMessageBuilder newShippingDetail(@Nullable ItemShippingDetails newShippingDetail) Shipping Details of the Order after the Remove LineItem update action.
- Parameters:
newShippingDetail
- value to be set- Returns:
- Builder
-
getId
Unique identifier of the Message. Can be used to track which Messages have been processed.
- Returns:
- id
-
getVersion
Version of a resource. In case of Messages, this is always
1
.- Returns:
- version
-
getCreatedAt
Date and time (UTC) the Message was generated.
- Returns:
- createdAt
-
getLastModifiedAt
Value of
createdAt
.- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the Message.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the Message.
- Returns:
- createdBy
-
getSequenceNumber
Message number in relation to other Messages for a given resource. The
sequenceNumber
of the next Message for the resource is the successor of thesequenceNumber
of the current Message. Meaning, thesequenceNumber
of the next Message equals thesequenceNumber
of the current Message + 1.sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.- Returns:
- sequenceNumber
-
getResource
Reference to the resource on which the change or action was performed.
- Returns:
- resource
-
getResourceVersion
Version of the resource on which the change or action was performed.
- Returns:
- resourceVersion
-
getResourceUserProvidedIdentifiers
User-provided identifiers of the resource, such as
key
orexternalId
. Only present if the resource has such identifiers.- Returns:
- resourceUserProvidedIdentifiers
-
getLineItemId
Unique identifier of the Line Item.
- Returns:
- lineItemId
-
getLineItemKey
User-defined unique identifier of the LineItem.
- Returns:
- lineItemKey
-
getRemovedQuantity
Quantity of Line Items that were removed during the Remove LineItem update action.
- Returns:
- removedQuantity
-
getNewQuantity
Line Item quantity after the Remove LineItem update action.
- Returns:
- newQuantity
-
getNewState
ItemStates after the Remove LineItem update action.
- Returns:
- newState
-
getNewTotalPrice
totalPrice
of the Order after the Remove LineItem update action.- Returns:
- newTotalPrice
-
getNewTaxedPrice
TaxedItemPrice of the Order after the Remove LineItem update action.
- Returns:
- newTaxedPrice
-
getNewPrice
Price of the Order after the Remove LineItem update action.
- Returns:
- newPrice
-
getNewShippingDetail
Shipping Details of the Order after the Remove LineItem update action.
- Returns:
- newShippingDetail
-
build
builds OrderLineItemRemovedMessage with checking for non-null required values- Specified by:
build
in interfaceBuilder<OrderLineItemRemovedMessage>
- Returns:
- OrderLineItemRemovedMessage
-
buildUnchecked
builds OrderLineItemRemovedMessage without checking for non-null required values- Returns:
- OrderLineItemRemovedMessage
-
of
factory method for an instance of OrderLineItemRemovedMessageBuilder- Returns:
- builder
-
of
create builder for OrderLineItemRemovedMessage instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-