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 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 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 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 status of the contact.

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

Property Value

ContactStatus

Contact's status.

UpdatedAt

Gets 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.