Skip to content
Snippets Groups Projects
Commit d987abc4 authored by Andreas Ellewsen's avatar Andreas Ellewsen
Browse files

Refactor models and methods for batches

Instead of mixing the Batch model for batches sent *to* with batches
received *from* SETRA, we switch to using an InputBatch and an
OutputBatch. The InputBatch contains the fields that can be used when
sending a Batch (with Vouchers and Transactions), and the OutputBatch
contains all the information one receives from SETRA when fetching a
single batch from the batch/ endpoint, or multiple using the search
functionality.

The get_batch method is reduced to only fetch a single batch, while the
new search_batches method takes the role of searching based on creation
date and interface. In addition, the return_list_of_obj parameter is
removed in favor of the return_objects class attribute.

This commit expects that SETRA includes the id field in Batches.
parent 36aa752f
No related branches found
No related tags found
Loading
Checking pipeline status