Newer
Older
sendgrid-api / src / main / java / io / ljunggren / sendgrid / api / service / Aggregation.java
package io.ljunggren.sendgrid.api.service;

/**
 * Aggregation granularity for SendGrid statistics queries.
 *
 * <p>Maps to the {@code aggregated_by} query parameter on the
 * SendGrid {@code /stats} endpoint.</p>
 */
public enum Aggregation {

	DAY("day"),
	WEEK("week"),
	MONTH("month");

	private final String value;

	Aggregation(String value) {
		this.value = value;
	}

	/**
	 * @return the value expected by the SendGrid REST API
	 */
	public String getValue() {
		return value;
	}
}