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

io.rocketbase.mail.dto.webhook.BounceWebhookMessage Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version
package io.rocketbase.mail.dto.webhook;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.rocketbase.mail.dto.webhook.sub.BounceType;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.Instant;
import java.util.Date;
import java.util.Map;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class BounceWebhookMessage implements WebhookMessage {

    @JsonProperty("MessageID")
    private String messageId;

    @Override
    public WebhookRecordType getRecordType() {
        return WebhookRecordType.BOUNCE;
    }

    @JsonProperty("ID")
    private Long id;

    @JsonProperty("Type")
    private BounceType type;

    @JsonProperty("TypeCode")
    private Integer typeCode;

    @JsonProperty("Name")
    private String name;

    @JsonProperty("Email")
    private String email;

    @JsonProperty("From")
    private String from;

    @JsonProperty("Metadata")
    private Map metadata;

    @JsonProperty("Inactive")
    private boolean inactive;

    @JsonProperty("CanActivate")
    private boolean canActivate;

    @JsonProperty("BouncedAt")
    @JsonDeserialize(using = PostmarkInstantDeserialzer.class)
    private Instant bouncedAt;


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy