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
CityOrTown
Gets the validated city or town name returned by the provider.
[JsonPropertyName("cityOrTown")]
string? CityOrTown { get; }
Property Value
Country
Gets the country code
[JsonPropertyName("country")]
CountryCode Country { get; }
Property Value
Remarks
Refer to CountryCode for accepted values.
CustomResponseData
Gets custom response data
[JsonPropertyName("customResponseData")]
IReadOnlyDictionary<string, object?> CustomResponseData { get; }
Property Value
Remarks
Collection may be empty for services that do not provide additional response information.
Errors
Gets the set of error messages produced during request or response validation; empty when validation succeeds.
[JsonPropertyName("errors")]
IReadOnlySet<string> Errors { get; }
Property Value
IsResidential
Gets the residential indicator for the address
[JsonPropertyName("isResidential")]
bool? IsResidential { get; }
Property Value
- bool?
Remarks
Value may be null for services that do not return an indicator.
PostalCode
Gets the zip (postal) code
[JsonPropertyName("postalCode")]
string? PostalCode { get; }
Property Value
Remarks
Value may be omitted for countries that do not support the concept of a postal code.
StateOrProvince
Gets the state (province)
[JsonPropertyName("stateOrProvince")]
string? StateOrProvince { get; }
Property Value
Remarks
Value may be omitted for countries that are considered city-states.
Suggestions
Gets suggested addresses created during validation
[JsonPropertyName("suggestions")]
IReadOnlyList<IAddressValidationResponse> Suggestions { get; }
Property Value
Remarks
Collection may be empty if no suggestions provided or validation service does not provide them.
Warnings
Gets the set of warning messages produced during request or response validation; empty when no warnings are present.
[JsonPropertyName("warnings")]
IReadOnlySet<string> Warnings { get; }