EngageSoftware/elm-engage-common/8.2.8

NOTE: the latest version is 8.2.10

Engage.Entity.Address

Entity.Address

type alias Address =
{ addressType : Maybe AddressType
, addressId : Maybe Int
, name : String
, address1 : String
, address2 : String
, country : Maybe ListItem
, region : Maybe ListItem
, city : String
, postalCode : String
, phone : PhoneNumber
, fax : PhoneNumber
, website : String
, relativeOrder : Int
, isPrimaryAddress : Bool
, includeInInternalDirectory : Bool
, includeInExternalDirectory : Bool
}

The Address type

type alias AddressLike a =
{ a
| address1 : String
, address2 : String
, country : Maybe ListItem
, region : Maybe ListItem
, city : String
, postalCode : String
}

The AddressLike type

type alias AddressType =
{ addressTypeId : Int
, shortDescription : String
, longDescription : String
}

The AddressType type

type alias AddressTypes =
Dict AddressTypeId AddressType

The AddressTypes type

type alias Countries =
Dict CountryId CountryData

The Countries type

type alias CountryId =
Int

The CountryId type

type alias RegionId =
Int

The RegionId type

type alias Regions =
Dict RegionId RegionData

The Regions type

type alias RegionsCountry =
Dict CountryId Regions

The RegionsCountry type

addressTypeDecoder : Decoder AddressType

An AddressType decoder

addressTypesDecoder : Decoder AddressTypes

An AddressTypes decoder

countriesDecoder : Decoder Countries

The Countries decoder

decoder : Decoder Address

The Address decoder

empty : Address

Get an empty Address

emptyAddressType : AddressType

Get an empty AddressType

Get an empty primary Address

encoder : Address -> Value

The Address encoder

encoderWith : List ( String, Value ) -> Address -> Value

The Address encoder with fields

getRegionsForCountry : CountryId -> RegionsCountry -> Regions

Get Regions for a country

regionsCountryDecoder : Decoder RegionsCountry

The RegionsCountry decoder