Yubin.Address (yubin v0.1.0)

Copy Markdown View Source

One row of Japan Post postal code data.

kind tells which source the row comes from:

  • :area - a town in the home/area data (KEN_ALL)
  • :building - one floor of a high-rise building that has its own codes
  • :business - a business that has its own code (JIGYOSYO)

town is "" when the code covers the whole city. Kana are full-width katakana. floor is set only for :building rows, and is nil for the basement or an unknown floor. business_name and street are set only for :business rows. A business row has town_kana: nil when the area data has no single reading for its town.

Summary

Types

kind()

@type kind() :: :area | :building | :business

t()

@type t() :: %Yubin.Address{
  business_name: String.t() | nil,
  city: String.t(),
  city_kana: String.t() | nil,
  floor: pos_integer() | nil,
  kind: kind(),
  note: String.t() | nil,
  postal_code: String.t(),
  prefecture: Yubin.Prefecture.t(),
  street: String.t() | nil,
  town: String.t(),
  town_kana: String.t() | nil
}