2024-03-05 11:02:58 +00:00
|
|
|
defmodule IbanEx.Serialize do
|
2024-03-07 23:39:33 +00:00
|
|
|
@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
|