Table of Contents

Interface IAddressValidationResponse

Namespace
Visus.AddressValidation.Models
Assembly
Visus.AddressValidation.dll

Represents a unified address validation response.

public interface IAddressValidationResponse

Properties

AddressLines

Gets the validated address lines returned by the provider.

[JsonPropertyName("addressLines")]
IReadOnlySet<string> AddressLines { get; }

Property Value

IReadOnlySet<string>

CityOrTown

Gets the validated city or town name returned by the provider.

[JsonPropertyName("cityOrTown")]
string? CityOrTown { get; }

Property Value

string

Country

Gets the country code.

[JsonPropertyName("country")]
CountryCode Country { get; }

Property Value

CountryCode

Remarks

Refer to CountryCode for accepted values.

CustomResponseData

Gets the custom response data.

[JsonPropertyName("customResponseData")]
IReadOnlyDictionary<string, object?> CustomResponseData { get; }

Property Value

IReadOnlyDictionary<string, object>

Remarks

The collection is empty for providers that offer no additional response information.

Errors

Gets the set of error messages from request or response validation. The set is empty when validation succeeds.

[JsonPropertyName("errors")]
IReadOnlySet<string> Errors { get; }

Property Value

IReadOnlySet<string>

IsResidential

Gets the residential indicator for the address.

[JsonPropertyName("isResidential")]
bool? IsResidential { get; }

Property Value

bool?

Remarks

Value may be null for providers that do not return an indicator.

PostalCode

Gets the postal code.

[JsonPropertyName("postalCode")]
string? PostalCode { get; }

Property Value

string

Remarks

Value may be omitted for countries that do not support the concept of a postal code.

StateOrProvince

Gets the state or province.

[JsonPropertyName("stateOrProvince")]
string? StateOrProvince { get; }

Property Value

string

Remarks

Value may be omitted for countries that are considered city-states.

Suggestions

Gets the suggested addresses created during validation.

[JsonPropertyName("suggestions")]
IReadOnlyList<IAddressValidationResponse> Suggestions { get; }

Property Value

IReadOnlyList<IAddressValidationResponse>

Remarks

The collection is empty when the provider offers no suggestions.

Warnings

Gets the set of warning messages from request or response validation. The set is empty when no warnings exist.

[JsonPropertyName("warnings")]
IReadOnlySet<string> Warnings { get; }

Property Value

IReadOnlySet<string>