Bacen.CCS.Serializer (Bacen CCS v0.1.1)
The CCS message serializer.
Link to this section Summary
Functions
Serializes an t:Ecto.Schema
into a tuple-formatted XML and
validates it's XML with his XSD.
Link to this section Functions
Link to this function
serialize(header_attrs, body_attrs)
Specs
Serializes an t:Ecto.Schema
into a tuple-formatted XML and
validates it's XML with his XSD.
Examples
iex> header = %{
iex> file_id: "000000000000",
iex> file_name: "ACCS002",
iex> issuer_id: "69930846",
iex> recipient_id: "25992990"
iex> }
iex> body = %{
iex> response: %{
iex> last_file_id: "000000000000",
iex> movement_date: ~D[2021-05-07],
iex> reference_date: ~U[2021-05-07 05:04:00Z],
iex> status: "A"
iex> }
iex> }
iex> Bacen.CCS.Serializer.serialize(header, body)
{:ok, ~s( <