All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.sphere.sdk.payments.messages.PaymentInteractionAddedMessage Maven / Gradle / Ivy

There is a newer version: 1.0.0-M26
Show newest version
package io.sphere.sdk.payments.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.payments.Payment;
import io.sphere.sdk.types.CustomFields;

import java.time.ZonedDateTime;

/**
 * This message is the result of the {@link io.sphere.sdk.payments.commands.updateactions.AddInterfaceInteraction} update action.
 *
 * {@include.example io.sphere.sdk.payments.commands.PaymentUpdateCommandTest#addInterfaceInteraction()}
 *
 * @see Payment
 * @see io.sphere.sdk.payments.commands.updateactions.AddInterfaceInteraction
 */
@JsonDeserialize(as = PaymentInteractionAddedMessage.class)//important to override annotation in Message class
public class PaymentInteractionAddedMessage extends GenericMessageImpl {
    public static final String MESSAGE_TYPE = "PaymentInteractionAdded";
    public static final MessageDerivateHint MESSAGE_HINT =
            MessageDerivateHint.ofSingleMessageType(MESSAGE_TYPE, PaymentInteractionAddedMessage.class);

    private final CustomFields interaction;

    @JsonCreator
    private PaymentInteractionAddedMessage(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 CustomFields interaction) {
        super(id, version, createdAt, lastModifiedAt, resource, sequenceNumber, resourceVersion, type, Payment.class);
        this.interaction = interaction;
    }

    public CustomFields getInteraction() {
        return interaction;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy