Packages

This library follows the METRO 2 ® data reporting format, which is a data reporting format for consumer credit account data furnishers.

Current section

Files

Jump to
metro2 lib metro2 records segment.ex
Raw

lib/metro2/records/segment.ex

defmodule Metro2.Segment do
@moduledoc """
This module defines the to_metro method for header-, base- and tailer-segment.
"""
alias Metro2.Fields
@doc false
# this function returns a list of the metro2 converted fields of the segment
def to_metro2(%{}= segment) do
segment |> Map.values |> Enum.filter_map( &is_map/1, &Fields.to_metro2/1)
end
end