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

com.mparticle.sdk.model.eventprocessing.PromotionActionEvent Maven / Gradle / Ivy

package com.mparticle.sdk.model.eventprocessing;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;
import java.util.Map;

public final class PromotionActionEvent extends Event {

    @JsonProperty(value = "action", required = true)
    private Action action;

    @JsonProperty("attributes")
    private Map attributes;

    @JsonProperty("promotions")
    private List promotions;

    public PromotionActionEvent() {
        super(Type.PROMOTION_ACTION);
    }

    public Action getAction() {
        return action;
    }

    public PromotionActionEvent setAction(Action action) {
        this.action = action;
        return this;
    }

    public List getPromotions() {
        return this.promotions;
    }

    public PromotionActionEvent setPromotions(List promotions) {
        this.promotions = promotions;
        return this;
    }

    public Map getAttributes() {
        return this.attributes;
    }

    public PromotionActionEvent setAttributes(Map attributes) {
        this.attributes = attributes;
        return this;
    }

    public enum Action {
        UNKNOWN,
        VIEW,
        CLICK;

        @Override
        public String toString() {
            return this.name().toLowerCase();
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy