Brasilapi.Ddd.Info (BrasilAPI v0.1.5)
View SourceStruct representing DDD information from BrasilAPI DDD v1.
This struct contains DDD information including the state and list of cities that use the specified area code.
Summary
Functions
Creates a DDD Info struct from a map.
Types
Functions
Creates a DDD Info struct from a map.
Examples
iex> map = %{
...> "state" => "SP",
...> "cities" => [
...> "EMBU",
...> "VÁRZEA PAULISTA",
...> "VARGEM GRANDE PAULISTA",
...> "SÃO PAULO"
...> ]
...> }
iex> Brasilapi.Ddd.Info.from_map(map)
%Brasilapi.Ddd.Info{
state: "SP",
cities: ["EMBU", "VÁRZEA PAULISTA", "VARGEM GRANDE PAULISTA", "SÃO PAULO"]
}