StrawHat.Map v1.2.1 StrawHat.Map.Cities View Source
Defines functionality for cities management.
Link to this section Summary
Functions
Creates a city
Destroys a city
Gets a city by id
Gets the list of cities
Gets list of cities
Gets a city by id
Returns the postal code rule of the associated country
Updates a city
Link to this section Functions
Link to this function
create_city(city_attrs)
View Source
create_city(StrawHat.Map.City.city_attrs()) :: {:ok, StrawHat.Map.City.t()} | {:error, Ecto.Changeset.t()}
Creates a city.
Link to this function
destroy_city(city)
View Source
destroy_city(StrawHat.Map.City.t()) :: {:ok, StrawHat.Map.City.t()} | {:error, Ecto.Changeset.t()}
Destroys a city.
Link to this function
find_city(city_id)
View Source
find_city(String.t()) :: {:ok, StrawHat.Map.City.t()} | {:error, StrawHat.Error.t()}
Gets a city by id
.
Link to this function
get_cities(pagination \\ [])
View Source
get_cities(Scrivener.Config.t()) :: Scrivener.Page.t()
Gets the list of cities.
Link to this function
get_cities_by_ids(city_ids)
View Source
get_cities_by_ids([integer()]) :: [StrawHat.Map.City.t()] | no_return()
Gets list of cities.
Link to this function
get_city(city_id)
View Source
get_city(String.t()) :: StrawHat.Map.City.t() | nil | no_return()
Gets a city by id
.
Returns the postal code rule of the associated country.
Link to this function
update_city(city, city_attrs)
View Source
update_city(StrawHat.Map.City.t(), StrawHat.Map.City.city_attrs()) :: {:ok, StrawHat.Map.City.t()} | {:error, Ecto.Changeset.t()}
Updates a city.