2024-03-05 06:02:58 -05:00
|
|
|
defmodule IbanEx.Serialize do
|
2024-03-07 18:39:33 -05:00
|
|
|
@moduledoc false
|
|
|
|
|
2024-03-05 06:02:58 -05:00
|
|
|
alias IbanEx.{Iban, Formatter}
|
|
|
|
|
|
|
|
@spec to_string(Iban.t()) :: String.t()
|
|
|
|
def to_string(iban), do: Formatter.format(iban)
|
|
|
|
|
2024-05-14 19:15:55 -04:00
|
|
|
@spec to_map(Iban.t()) :: map()
|
2024-03-05 06:02:58 -05:00
|
|
|
def to_map(iban), do: Map.from_struct(iban)
|
|
|
|
end
|