This pull request contains changes to provide the batch id of a certain transaction. The batch id is used in bank transactions to reference a certain batch in a SEPA message.
Added are two extra methods for a SEPA::Message:
SEPA::Message#batch_id(transaction_reference): fetches the batch id of the transaction with the given reference
SEPA::Message#batches: returns an array with the batch ids of the batch in the current file
For a successful implementation of these methods, a refactor was required. Transactions are now stored in groups right after adding a transaction with add_transaction. For backward compatibility, it is still possible to get all transactions across all batches by calling the transactions method.
This pull request contains changes to provide the batch id of a certain transaction. The batch id is used in bank transactions to reference a certain batch in a SEPA message.
Added are two extra methods for a
SEPA::Message
:SEPA::Message#batch_id(transaction_reference)
: fetches the batch id of the transaction with the given referenceSEPA::Message#batches
: returns an array with the batch ids of the batch in the current fileFor a successful implementation of these methods, a refactor was required. Transactions are now stored in groups right after adding a transaction with
add_transaction
. For backward compatibility, it is still possible to get all transactions across all batches by calling thetransactions
method.