Packages

BeamLabCountries is a collection of all sorts of useful information for every country in the [ISO 3166](https://wikipedia.org/wiki/ISO_3166) standard. It includes country data, subdivisions (states/provinces), international organizations, language information, and country name translations.

Current section

Files

Jump to
beamlab_countries lib country.ex
Raw

lib/country.ex

defmodule BeamLabCountries.Country do
@moduledoc """
Country struct.
"""
@type t :: %__MODULE__{
number: integer() | nil,
alpha2: String.t() | nil,
alpha3: String.t() | nil,
currency: String.t() | nil,
name: String.t() | nil,
flag: String.t() | nil,
unofficial_names: [String.t()] | nil,
continent: String.t() | nil,
region: String.t() | nil,
subregion: String.t() | nil,
geo: map() | nil,
world_region: String.t() | nil,
country_code: String.t() | nil,
national_destination_code_lengths: [integer()] | nil,
national_number_lengths: [integer()] | nil,
international_prefix: String.t() | nil,
national_prefix: String.t() | nil,
ioc: String.t() | nil,
gec: String.t() | nil,
un_locode: String.t() | nil,
languages_official: [String.t()] | nil,
languages_spoken: [String.t()] | nil,
language_locales: map() | nil,
nationality: String.t() | nil,
address_format: String.t() | nil,
dissolved_on: String.t() | nil,
eu_member: boolean() | nil,
eea_member: boolean() | nil,
alt_currency: String.t() | nil,
vat_rates: map() | nil,
postal_code: String.t() | nil,
currency_code: String.t() | nil,
start_of_week: String.t() | nil,
subdivision_type: String.t() | nil
}
defstruct [
:number,
:alpha2,
:alpha3,
:currency,
:name,
:flag,
:unofficial_names,
:continent,
:region,
:subregion,
:geo,
:world_region,
:country_code,
:national_destination_code_lengths,
:national_number_lengths,
:international_prefix,
:national_prefix,
:ioc,
:gec,
:un_locode,
:languages_official,
:languages_spoken,
:language_locales,
:nationality,
:address_format,
:dissolved_on,
:eu_member,
:eea_member,
:alt_currency,
:vat_rates,
:postal_code,
:currency_code,
:start_of_week,
:subdivision_type
]
end