From 00288e03040d2b85b6f07778a5cab7e3bc7e14a2 Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Thu, 19 Oct 2023 16:52:24 +0200 Subject: [PATCH] README: Add documentation --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 74afc4c..23ea338 100644 --- a/README.md +++ b/README.md @@ -9,4 +9,16 @@ Library for making Bankgirot supplier payment files, _Leverantörsbetalningar_. * På svenska: ["Leverantörsbetalningar, teknisk manual"](http://www.bgc.se/globalassets/dokument/tekniska-manualer/leverantorsbetalningar_tekniskmanual_sv.pdf) (PDF) * In English: ["Supplier Payments (Leverantörsbetalningar), technical manual"](http://www.bgc.se/globalassets/dokument/tekniska-manualer/supplierpayments_leverantorsbetalningar_technicalmanual_en.pdf) (PDF) +Records are defined in `lib/supplier_payments/payment_file/domestic_records.rb`. Layouts are defined with arrays, like: + +```ruby +[ :credit_transfer_number, 6, 'N', :right_align, :zerofill ] +# :credit_transfer_number is the name of the field +# 6 is the length of the field +# `"N"` if the value consists of two digits, or `"A"` for strings. +# Options for formatting are: +# :right_align if the field is to be right-aligned (otherwise it will be left-aligned) +# :zerofill if the field is to be filled with zeros +``` + [API documentation for this gem](https://www.rubydoc.info/gems/supplier_payments/)