Class ScheduleEmailCampaignRequest
- Namespace
- Mailtrap.EmailCampaigns.Requests
- Assembly
- Mailtrap.Abstractions.dll
Request object for scheduling an email campaign - when to start sending it.
public sealed record ScheduleEmailCampaignRequest : IValidatable, IEquatable<ScheduleEmailCampaignRequest>
- Inheritance
-
ScheduleEmailCampaignRequest
- Implements
Constructors
ScheduleEmailCampaignRequest(DateTimeOffset)
Primary instance constructor.
[JsonConstructor]
public ScheduleEmailCampaignRequest(DateTimeOffset datetime)
Parameters
datetimeDateTimeOffsetThe date and time to send the campaign at.
Properties
Datetime
Gets the date and time to send the campaign at.
Must be in the future and no more than 1 month ahead.
[JsonPropertyName("datetime")]
[JsonPropertyOrder(1)]
public DateTimeOffset Datetime { get; }
Property Value
- DateTimeOffset
Scheduled send time. Serialized as an ISO 8601 string.
Methods
Validate()
Validates the current instance.
public ValidationResult Validate()
Returns
- ValidationResult
Object containing validation errors, if any.