Class CreateSuppressionRequest
- Namespace
- Mailtrap.Suppressions.Requests
- Assembly
- Mailtrap.Abstractions.dll
Request object for adding an email address to the account's suppression list.
public sealed record CreateSuppressionRequest : IValidatable, IEquatable<CreateSuppressionRequest>
- Inheritance
-
CreateSuppressionRequest
- Implements
Properties
DomainId
Gets or sets the identifier of the domain to suppress this email for.
[JsonPropertyName("domain_id")]
[JsonPropertyOrder(2)]
public long DomainId { get; set; }
Property Value
- long
Domain identifier.
Gets or sets the email address to suppress.
[JsonPropertyName("email")]
[JsonPropertyOrder(1)]
public string? Email { get; set; }
Property Value
- string
Email address to suppress.
SendingStream
Gets or sets the sending stream to suppress this email for.
[JsonPropertyName("sending_stream")]
[JsonPropertyOrder(3)]
public SendingStream SendingStream { get; set; }
Property Value
- SendingStream
Sending stream.
Type
Gets or sets the reason for the suppression.
[JsonPropertyName("type")]
[JsonPropertyOrder(4)]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public SuppressionType? Type { get; set; }
Property Value
- SuppressionType
Suppression reason, or null to let the API default it to
manual import.
Methods
Validate()
Validates the current instance.
public ValidationResult Validate()
Returns
- ValidationResult
Object containing validation errors, if any.