io.sphere.sdk.orders.messages.DeliveryAddedMessage Maven / Gradle / Ivy
package io.sphere.sdk.orders.messages;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.sphere.sdk.messages.GenericMessageImpl;
import io.sphere.sdk.messages.MessageDerivateHint;
import io.sphere.sdk.orders.Delivery;
import io.sphere.sdk.orders.Order;
import java.time.ZonedDateTime;
@JsonDeserialize(as = DeliveryAddedMessage.class)//important to override annotation in Message class
public class DeliveryAddedMessage extends GenericMessageImpl {
public static final String MESSAGE_TYPE = "DeliveryAdded";
public static final MessageDerivateHint MESSAGE_HINT = MessageDerivateHint.ofSingleMessageType(MESSAGE_TYPE, DeliveryAddedMessage.class);
private final Delivery delivery;
@JsonCreator
private DeliveryAddedMessage(final String id, final Long version, final ZonedDateTime createdAt, final ZonedDateTime lastModifiedAt, final JsonNode resource, final Long sequenceNumber, final Long resourceVersion, final String type, final Delivery delivery) {
super(id, version, createdAt, lastModifiedAt, resource, sequenceNumber, resourceVersion, type, Order.class);
this.delivery = delivery;
}
public Delivery getDelivery() {
return delivery;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy