Interface ResourceUpdatedDeliveryPayload
- All Superinterfaces:
DeliveryPayload
- All Known Subinterfaces:
ResourceUpdatedDelivery
This payload is sent for a ChangeSubscription when a resource is updated. This includes updates by a background process, like a change in product availability.
Example to create an instance using the builder pattern
ResourceUpdatedDeliveryPayload resourceUpdatedDeliveryPayload = ResourceUpdatedDeliveryPayload.builder()
.projectKey("{projectKey}")
.resource(resourceBuilder -> resourceBuilder)
.version(0.3)
.oldVersion(0.3)
.modifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for ResourceUpdatedDeliveryPayload -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for ResourceUpdatedDeliveryPayloadbuilder
(ResourceUpdatedDeliveryPayload template) create builder for ResourceUpdatedDeliveryPayload instancedeepCopy
(ResourceUpdatedDeliveryPayload template) factory method to create a deep copy of ResourceUpdatedDeliveryPayload@NotNull ZonedDateTime
Date and time (UTC) the resource was last updated.@NotNull Long
Version of the resource before the update.@NotNull Long
Last seen version of the resource.of()
factory methodof
(ResourceUpdatedDeliveryPayload template) factory method to create a shallow copy ResourceUpdatedDeliveryPayloadvoid
setModifiedAt
(ZonedDateTime modifiedAt) Date and time (UTC) the resource was last updated.void
setOldVersion
(Long oldVersion) Version of the resource before the update.void
setVersion
(Long version) Last seen version of the resource.static com.fasterxml.jackson.core.type.TypeReference<ResourceUpdatedDeliveryPayload>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.subscription.DeliveryPayload
getNotificationType, getProjectKey, getResource, getResourceUserProvidedIdentifiers, setProjectKey, setResource, setResourceUserProvidedIdentifiers, withDeliveryPayload
-
Field Details
-
RESOURCE_UPDATED
discriminator value for ResourceUpdatedDeliveryPayload- See Also:
-
-
Method Details
-
getVersion
Last seen version of the resource.
- Returns:
- version
-
getOldVersion
Version of the resource before the update.
- Returns:
- oldVersion
-
getModifiedAt
Date and time (UTC) the resource was last updated.
- Returns:
- modifiedAt
-
setVersion
Last seen version of the resource.
- Parameters:
version
- value to be set
-
setOldVersion
Version of the resource before the update.
- Parameters:
oldVersion
- value to be set
-
setModifiedAt
Date and time (UTC) the resource was last updated.
- Parameters:
modifiedAt
- value to be set
-
of
factory method- Returns:
- instance of ResourceUpdatedDeliveryPayload
-
of
factory method to create a shallow copy ResourceUpdatedDeliveryPayload- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static ResourceUpdatedDeliveryPayload deepCopy(@Nullable ResourceUpdatedDeliveryPayload template) factory method to create a deep copy of ResourceUpdatedDeliveryPayload- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ResourceUpdatedDeliveryPayload- Returns:
- builder
-
builder
create builder for ResourceUpdatedDeliveryPayload instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withResourceUpdatedDeliveryPayload
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
static com.fasterxml.jackson.core.type.TypeReference<ResourceUpdatedDeliveryPayload> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-