Interface EventDeliveryPayload
- All Superinterfaces:
SubscriptionNotification
This payload is sent for an EventSubscription.
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()
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic EventDeliveryPayloadBuilder
builder()
builder factory method for EventDeliveryPayloadstatic EventDeliveryPayloadBuilder
builder
(EventDeliveryPayload template) create builder for EventDeliveryPayload instancecopyDeep()
static EventDeliveryPayload
deepCopy
(EventDeliveryPayload template) factory method to create a deep copy of EventDeliveryPayload@NotNull ZonedDateTime
Date and time (UTC) the resource was initially created.@NotNull @Valid Object
getData()
The data describing the event that has taken place.@NotNull String
getId()
Unique identifier of the Event.@NotNull String
The type of resource targeted by the Event.@NotNull EventType
getType()
The type of Event that has occurred.static EventDeliveryPayload
of()
factory methodstatic EventDeliveryPayload
of
(EventDeliveryPayload template) factory method to create a shallow copy EventDeliveryPayloadvoid
setCreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the resource was initially created.void
The data describing the event that has taken place.void
Unique identifier of the Event.void
setResourceType
(String resourceType) The type of resource targeted by the Event.void
The type of Event that has occurred.static com.fasterxml.jackson.core.type.TypeReference<EventDeliveryPayload>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withEventDeliveryPayload
(Function<EventDeliveryPayload, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.subscription.SubscriptionNotification
getNotificationType, withSubscriptionNotification
-
Field Details
-
EVENT
discriminator value for EventDeliveryPayload- See Also:
-
-
Method Details
-
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
-
setId
Unique identifier of the Event.
- Parameters:
id
- value to be set
-
setType
The type of Event that has occurred.
- Parameters:
type
- value to be set
-
setResourceType
The type of resource targeted by the Event.
- Parameters:
resourceType
- value to be set
-
setData
The data describing the event that has taken place.
- Parameters:
data
- value to be set
-
setCreatedAt
Date and time (UTC) the resource was initially created.
- Parameters:
createdAt
- value to be set
-
of
factory method- Returns:
- instance of EventDeliveryPayload
-
of
factory method to create a shallow copy EventDeliveryPayload- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
copyDeep
EventDeliveryPayload copyDeep()- Specified by:
copyDeep
in interfaceSubscriptionNotification
-
deepCopy
factory method to create a deep copy of EventDeliveryPayload- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for EventDeliveryPayload- Returns:
- builder
-
builder
create builder for EventDeliveryPayload instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withEventDeliveryPayload
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-