108 lines
3.3 KiB
C#
108 lines
3.3 KiB
C#
using Landmark.OLA.Models.Individuals.Enums;
|
|
|
|
namespace CRIF.ACTion.Common
|
|
{
|
|
public static class ContactMechanisms
|
|
{
|
|
public static CrifContactMechanism GetPhoneType(PhoneType type)
|
|
{
|
|
switch (type)
|
|
{
|
|
case PhoneType.Home:
|
|
return CrifContactMechanism.HomePhone;
|
|
case PhoneType.Mobile:
|
|
return CrifContactMechanism.CellPhone;
|
|
default:
|
|
throw new ArgumentOutOfRangeException(nameof(type), "Unexpected PhoneType value");
|
|
}
|
|
}
|
|
|
|
public static ContactMechanismCategory GetContactMechanismCategory(CrifContactMechanism mechanism)
|
|
{
|
|
switch (mechanism)
|
|
{
|
|
case CrifContactMechanism.HomePhone:
|
|
case CrifContactMechanism.WorkPhone:
|
|
case CrifContactMechanism.CellPhone:
|
|
case CrifContactMechanism.Fax:
|
|
return ContactMechanismCategory.Phone;
|
|
case CrifContactMechanism.EMail:
|
|
case CrifContactMechanism.URL:
|
|
return ContactMechanismCategory.EmailOrUrl;
|
|
case CrifContactMechanism.CurrentAddress:
|
|
case CrifContactMechanism.MailingAddress:
|
|
case CrifContactMechanism.PreviousAddress:
|
|
case CrifContactMechanism.RealEstateAddress:
|
|
case CrifContactMechanism.ParkContactAddress:
|
|
return ContactMechanismCategory.Address;
|
|
case CrifContactMechanism.NoneSelected:
|
|
default:
|
|
throw new ArgumentOutOfRangeException(nameof(mechanism), "ContactMechanismCategory not determined");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// ContactMechanismTypeEnum values from CRIF's commonSchema.xsd
|
|
/// </summary>
|
|
public enum CrifContactMechanism
|
|
{
|
|
NoneSelected,
|
|
HomePhone,
|
|
WorkPhone,
|
|
CellPhone,
|
|
Fax,
|
|
EMail,
|
|
CurrentAddress,
|
|
URL,
|
|
IM,
|
|
DriversLicenceState,
|
|
MailingAddress,
|
|
PreviousAddress,
|
|
ContractAddress,
|
|
LandlordPostalAddress,
|
|
LandlordPhone,
|
|
LandlordFax,
|
|
InventoryAddress,
|
|
AttorneyPostalAddress,
|
|
AttorneyPhone,
|
|
AttorneyFax,
|
|
AttorneyEMailAddress,
|
|
CPAPostalAddress,
|
|
CPAPhone,
|
|
CPAFax,
|
|
CPAEMailAddress,
|
|
VendorOFACEmail,
|
|
RealEstateAddress,
|
|
ParkContactAddress,
|
|
ParkPhone,
|
|
MarinaAddress,
|
|
MarinaStorageAddress,
|
|
InsurerPostalAddress,
|
|
InsurerPhone,
|
|
InsurerFax,
|
|
SellerPostalAddress,
|
|
SellerPhone,
|
|
SellerFax,
|
|
TitleClerkFax,
|
|
Pager,
|
|
AdHocPhone,
|
|
AdHocFax,
|
|
AdHocEMail,
|
|
AdHocAddress,
|
|
StatementPostalAddress,
|
|
BillingPostalAddress,
|
|
PropertyContactPhone,
|
|
}
|
|
|
|
/// <summary>
|
|
/// Per CRIF Data Mapping document
|
|
/// </summary>
|
|
public enum ContactMechanismCategory
|
|
{
|
|
Phone = 1,
|
|
Address = 2,
|
|
EmailOrUrl = 3,
|
|
}
|
|
}
|
|
}
|