Table of Contents

Class PostalAddress

Namespace
Payetools.Common.Model
Assembly
Payetools.Common.dll

Represents a postal address. If it is a UK address, Postcode should be supplied and ForeignCountry set to null; if the address is non-UK, then Postcode should be null and ForeignCountry should be provided.

public class PostalAddress
Inheritance
PostalAddress
Inherited Members

Constructors

PostalAddress(string, string, string?, string?, UkPostcode?, string?)

Initialises a new instance of PostalAddress.

public PostalAddress(string addressLine1, string addressLine2, string? addressLine3, string? addressLine4, UkPostcode? postcode, string? foreignCountry)

Parameters

addressLine1 string

First line of the address. Mandatory.

addressLine2 string

Second line of the address. Mandatory.

addressLine3 string

Third line of the address. Optional, i.e., may be null.

addressLine4 string

Fourth line of the address. Optional, i.e., may be null.

postcode UkPostcode

Postcode for UK addresses only. Should be set to null for overseas addresses.

foreignCountry string

Foreign country for overseas addresses. Should be null for UK addresses.

Properties

AddressLine1

Gets the first line of the address.

public string AddressLine1 { get; init; }

Property Value

string

AddressLine2

Gets the second line of the address.

public string AddressLine2 { get; init; }

Property Value

string

AddressLine3

Gets the third line of the address.

public string? AddressLine3 { get; init; }

Property Value

string

AddressLine4

Gets the fourth line of the address.

public string? AddressLine4 { get; init; }

Property Value

string

ForeignCountry

Gets the foreign country (non-UK addresses only).

public string? ForeignCountry { get; init; }

Property Value

string

Postcode

Gets the postcode (UK addresses only).

public UkPostcode? Postcode { get; init; }

Property Value

UkPostcode