Interface DeliveryPayload
- All Superinterfaces:
SubscriptionNotification
- All Known Subinterfaces:
MessageDelivery,MessageDeliveryPayload,ResourceCreatedDelivery,ResourceCreatedDeliveryPayload,ResourceDeletedDelivery,ResourceDeletedDeliveryPayload,ResourceUpdatedDelivery,ResourceUpdatedDeliveryPayload,SubscriptionDelivery
All payloads for the PlatformFormat share these common fields.
Example to create an instance using the builder pattern
DeliveryPayload deliveryPayload = DeliveryPayload.builder()
.projectKey("{projectKey}")
.resource(resourceBuilder -> resourceBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptioncopyDeep()static DeliveryPayloaddeepCopy(DeliveryPayload template) factory method to create a deep copy of DeliveryPayload@NotNull Stringkeyof the Project.@NotNull @Valid ReferenceReference to the resource that triggered the notification.@Valid UserProvidedIdentifiersUser-defined unique identifiers of the resource.voidsetProjectKey(String projectKey) keyof the Project.voidsetResource(Reference resource) Reference to the resource that triggered the notification.voidsetResourceUserProvidedIdentifiers(UserProvidedIdentifiers resourceUserProvidedIdentifiers) User-defined unique identifiers of the resource.static com.fasterxml.jackson.core.type.TypeReference<DeliveryPayload>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithDeliveryPayload(Function<DeliveryPayload, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.subscription.SubscriptionNotification
getNotificationType, withSubscriptionNotification
-
Method Details
-
getProjectKey
keyof the Project. Useful for processing notifications if the Destination receives them from multiple Projects.- Returns:
- projectKey
-
getResource
Reference to the resource that triggered the notification.
- Returns:
- resource
-
getResourceUserProvidedIdentifiers
User-defined unique identifiers of the resource.
- Returns:
- resourceUserProvidedIdentifiers
-
setProjectKey
keyof the Project. Useful for processing notifications if the Destination receives them from multiple Projects.- Parameters:
projectKey- value to be set
-
setResource
Reference to the resource that triggered the notification.
- Parameters:
resource- value to be set
-
setResourceUserProvidedIdentifiers
User-defined unique identifiers of the resource.
- Parameters:
resourceUserProvidedIdentifiers- value to be set
-
copyDeep
DeliveryPayload copyDeep()- Specified by:
copyDeepin interfaceSubscriptionNotification
-
deepCopy
factory method to create a deep copy of DeliveryPayload- Parameters:
template- instance to be copied- Returns:
- copy instance
-
withDeliveryPayload
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
-