Table of Contents

Class CreateCompanyInfoRequest

Namespace
Mailtrap.SendingDomains.Requests
Assembly
Mailtrap.Abstractions.dll

Request object for creating company information for a sending domain.

public sealed record CreateCompanyInfoRequest : IValidatable, IEquatable<CreateCompanyInfoRequest>
Inheritance
CreateCompanyInfoRequest
Implements

Properties

Address

Gets or sets street address.

[JsonPropertyName("address")]
[JsonPropertyOrder(2)]
public string? Address { get; set; }

Property Value

string

Street address.

City

Gets or sets city.

[JsonPropertyName("city")]
[JsonPropertyOrder(3)]
public string? City { get; set; }

Property Value

string

City.

Country

Gets or sets country.

[JsonPropertyName("country")]
[JsonPropertyOrder(4)]
public string? Country { get; set; }

Property Value

string

Country.

InfoLevel

Gets or sets whether the sender is a business or an individual.

[JsonPropertyName("info_level")]
[JsonPropertyOrder(10)]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public CompanyInfoLevel? InfoLevel { get; set; }

Property Value

CompanyInfoLevel

Sender info level, or null to omit.

Name

Gets or sets company or individual name.

[JsonPropertyName("name")]
[JsonPropertyOrder(1)]
public string? Name { get; set; }

Property Value

string

Company or individual name.

Phone

Gets or sets phone number.

[JsonPropertyName("phone")]
[JsonPropertyOrder(7)]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Phone { get; set; }

Property Value

string

Phone number, or null to omit.

PrivacyPolicyUrl

Gets or sets URL of the privacy policy page.

[JsonPropertyName("privacy_policy_url")]
[JsonPropertyOrder(8)]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public Uri? PrivacyPolicyUrl { get; set; }

Property Value

Uri

URL of the privacy policy page, or null to omit.

TermsOfServiceUrl

Gets or sets URL of the terms of service page.

[JsonPropertyName("terms_of_service_url")]
[JsonPropertyOrder(9)]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public Uri? TermsOfServiceUrl { get; set; }

Property Value

Uri

URL of the terms of service page, or null to omit.

WebsiteUrl

Gets or sets company website URL.

[JsonPropertyName("website_url")]
[JsonPropertyOrder(6)]
public Uri? WebsiteUrl { get; set; }

Property Value

Uri

Company website URL.

ZipCode

Gets or sets ZIP or postal code.

[JsonPropertyName("zip_code")]
[JsonPropertyOrder(5)]
public string? ZipCode { get; set; }

Property Value

string

ZIP or postal code.

Methods

Validate()

Validates the current instance.

public ValidationResult Validate()

Returns

ValidationResult

Object containing validation errors, if any.