Class EventDeliveryPayloadBuilder
java.lang.Object
com.commercetools.api.models.subscription.EventDeliveryPayloadBuilder
- All Implemented Interfaces:
Builder<EventDeliveryPayload>
EventDeliveryPayloadBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
EventDeliveryPayload eventDeliveryPayload = EventDeliveryPayload.builder()
.id("{id}")
.type(EventType.CHECKOUT_ORDER_CREATION_FAILED)
.resourceType("{resourceType}")
.data(dataBuilder -> dataBuilder)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds EventDeliveryPayload with checking for non-null required valuesbuilds EventDeliveryPayload without checking for non-null required valuescreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the resource was initially created.The data describing the event that has taken place.Date and time (UTC) the resource was initially created.getData()
The data describing the event that has taken place.getId()
Unique identifier of the Event.The type of resource targeted by the Event.getType()
The type of Event that has occurred.Unique identifier of the Event.static EventDeliveryPayloadBuilder
of()
factory method for an instance of EventDeliveryPayloadBuilderstatic EventDeliveryPayloadBuilder
of
(EventDeliveryPayload template) create builder for EventDeliveryPayload instanceresourceType
(String resourceType) The type of resource targeted by the Event.The type of Event that has occurred.
-
Constructor Details
-
EventDeliveryPayloadBuilder
public EventDeliveryPayloadBuilder()
-
-
Method Details
-
id
Unique identifier of the Event.
- Parameters:
id
- value to be set- Returns:
- Builder
-
type
The type of Event that has occurred.
- Parameters:
type
- value to be set- Returns:
- Builder
-
resourceType
The type of resource targeted by the Event.
- Parameters:
resourceType
- value to be set- Returns:
- Builder
-
data
The data describing the event that has taken place.
- Parameters:
data
- value to be set- Returns:
- Builder
-
createdAt
Date and time (UTC) the resource was initially created.
- Parameters:
createdAt
- value to be set- Returns:
- Builder
-
getId
Unique identifier of the Event.
- Returns:
- id
-
getType
The type of Event that has occurred.
- Returns:
- type
-
getResourceType
The type of resource targeted by the Event.
- Returns:
- resourceType
-
getData
The data describing the event that has taken place.
- Returns:
- data
-
getCreatedAt
Date and time (UTC) the resource was initially created.
- Returns:
- createdAt
-
build
builds EventDeliveryPayload with checking for non-null required values- Specified by:
build
in interfaceBuilder<EventDeliveryPayload>
- Returns:
- EventDeliveryPayload
-
buildUnchecked
builds EventDeliveryPayload without checking for non-null required values- Returns:
- EventDeliveryPayload
-
of
factory method for an instance of EventDeliveryPayloadBuilder- Returns:
- builder
-
of
create builder for EventDeliveryPayload instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-