iban-ex/lib/iban_ex/serialize.ex

12 lines
261 B
Elixir
Raw Normal View History

2024-03-05 11:02:58 +00:00
defmodule IbanEx.Serialize do
@moduledoc false
2024-03-05 11:02:58 +00:00
alias IbanEx.{Iban, Formatter}
@spec to_string(Iban.t()) :: String.t()
def to_string(iban), do: Formatter.format(iban)
2024-05-14 23:15:55 +00:00
@spec to_map(Iban.t()) :: map()
2024-03-05 11:02:58 +00:00
def to_map(iban), do: Map.from_struct(iban)
end