com.mailgun.model.suppression.bounces.BouncesRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mailgun-java Show documentation
Show all versions of mailgun-java Show documentation
The Mailgun SDK for Java enables Java developers to work with Mailgun API
efficiently.
The newest version!
package com.mailgun.model.suppression.bounces;
import com.mailgun.util.DateTimeUtil;
import feign.form.FormProperty;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;
import lombok.extern.jackson.Jacksonized;
import java.time.ZonedDateTime;
/**
*
* Bounces request.
*
*
* @see Suppressions/Bounces
*/
@Jacksonized
@Getter
@ToString
@EqualsAndHashCode
@Builder
public class BouncesRequest {
/**
*
* Valid email address.
*
*/
String address;
/**
*
* Error code (optional, default: 550).
*
*/
String code;
/**
*
* Error description (optional, default: empty string).
*
*/
String error;
/**
*
* Timestamp of a bounce event (optional, default: current time).
*
*/
@FormProperty("created_at")
String createdAt;
public static class BouncesRequestBuilder {
/**
*
* Timestamp of a bounce event (optional, default: current time).
*
* {@link ZonedDateTime}
*
* @param zonedDateTime {@link ZonedDateTime}
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BouncesRequest.BouncesRequestBuilder createdAt(ZonedDateTime zonedDateTime) {
this.createdAt = DateTimeUtil.toString(zonedDateTime);
return this;
}
}
}