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 EventDeliveryPayloadBuilderbuilder()builder factory method for EventDeliveryPayloadstatic EventDeliveryPayloadBuilderbuilder(EventDeliveryPayload template) create builder for EventDeliveryPayload instancecopyDeep()static EventDeliveryPayloaddeepCopy(EventDeliveryPayload template) factory method to create a deep copy of EventDeliveryPayload@NotNull ZonedDateTimeDate and time (UTC) the resource was initially created.@NotNull @Valid ObjectgetData()The data describing the event that has taken place.@NotNull StringgetId()Unique identifier of the Event.@NotNull StringThe type of resource targeted by the Event.@NotNull EventTypegetType()The type of Event that has occurred.static EventDeliveryPayloadof()factory methodstatic EventDeliveryPayloadof(EventDeliveryPayload template) factory method to create a shallow copy EventDeliveryPayloadvoidsetCreatedAt(ZonedDateTime createdAt) Date and time (UTC) the resource was initially created.voidThe data describing the event that has taken place.voidUnique identifier of the Event.voidsetResourceType(String resourceType) The type of resource targeted by the Event.voidThe type of Event that has occurred.static com.fasterxml.jackson.core.type.TypeReference<EventDeliveryPayload>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithEventDeliveryPayload(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:
copyDeepin 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
-