Table of Contents

Class Contact

Namespace
Mailtrap.Contacts.Models
Assembly
Mailtrap.Abstractions.dll

Represents Contact details.

public sealed record Contact : IEquatable<Contact>
Inheritance
Contact
Implements

Properties

CreatedAt

Gets or sets contact creation date and time.

[JsonPropertyName("created_at")]
[JsonConverter(typeof(DateTimeToUnixMsNullableJsonConverter))]
public DateTimeOffset? CreatedAt { get; set; }

Property Value

DateTimeOffset?

Contact creation date and time.

Email

Gets or sets contact email.

[JsonPropertyName("email")]
public string Email { get; set; }

Property Value

string

Contact email.

Fields

Gets contact fields.

[JsonPropertyName("fields")]
[JsonObjectCreationHandling(JsonObjectCreationHandling.Populate)]
public IDictionary<string, object> Fields { get; }

Property Value

IDictionary<string, object>

Contact fields.

Id

Gets or sets contact identifier.

[JsonPropertyName("id")]
public string Id { get; set; }

Property Value

string

Contact identifier.

ListIds

Gets contact's list ids.

[JsonPropertyName("list_ids")]
[JsonObjectCreationHandling(JsonObjectCreationHandling.Populate)]
public IList<int> ListIds { get; }

Property Value

IList<int>

Contact's list ids.

Status

Gets or sets status of the contact.

[JsonPropertyName("status")]
public ContactStatus Status { get; set; }

Property Value

ContactStatus

Contact status.

UpdatedAt

Gets or sets contact's update date and time.

[JsonPropertyName("updated_at")]
[JsonConverter(typeof(DateTimeToUnixMsNullableJsonConverter))]
public DateTimeOffset? UpdatedAt { get; set; }

Property Value

DateTimeOffset?

Contact's update date and time.