- Jan 14, 2022
-
-
Petr Kalashnikov authored
-
Petr Kalashnikov authored
-
- Nov 10, 2021
-
-
Jo Sama authored
requests.exceptions.JSONDecodeError is non existent in requests versions before 3.0.0. Therefore requests is pinned to 2.24 or greater, and we use ValueError instead of requests.exceptions.JSONDecodeError.
-
- Sep 21, 2021
-
-
Jo Sama authored
This commit makes the interface of put_update_batch() quit similar to post_new_batch().
-
Jo Sama authored
The Setra API does not accept null values for attributes, but it accepts that the attribute is omitted. We should probably accept null values for fields in order to avoid obscure bugs like this, but it does not hurt to omit the values. At least we use less of the bandwidth! :)
-
- Sep 07, 2021
-
-
Ruben.Havre authored
-
- Aug 16, 2021
-
-
Jo Sama authored
Exclude unset values from beeing transfered when posting a new batch to Setra. Setra does not accept fields set to None (at least period and vouchertype).
-
Jo Sama authored
This interface avoids leaking transport-specific information, while returning an indication of how the request fared so the user can decide on how to proceed with processing.
-
- Jul 13, 2021
-
-
Andreas Ellewsen authored
Before this commit it was unclear whether a post request was successful or not. We now return the content and status to make this clearer
-
- May 07, 2021
-
-
Andreas Ellewsen authored
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.
-
- Apr 27, 2021
-
-
rha104 authored
- Apr 26, 2021
-
-
rha104 authored
-
- Apr 23, 2021
-
- Mar 29, 2021
-
-
Petr Kalashnikov authored
-
- Mar 22, 2021
-
-
Andreas Ellewsen authored
Instead of two methods we now have one that does the appropriate action based on the input type.
-
Andreas Ellewsen authored
-
- Mar 15, 2021
-
-
Petr.Kalashnikov authored
-
Petr Kalashnikov authored
-
Petr Kalashnikov authored
-
- Mar 11, 2021
-
-
Petr Kalashnikov authored
-
Petr Kalashnikov authored
-
- Feb 26, 2021
-
-
Andreas Ellewsen authored
- Both get_batch_errors and get_batch_complete now return objects unless the client parameter return_objects is set to False - Tests for models, endpoints and client methods are included.
-
Petr Kalashnikov authored
-
Petr Kalashnikov authored
-
Petr Kalashnikov authored
-
- Feb 25, 2021
-
-
Petr Kalashnikov authored
-
- Feb 19, 2021
-
-
Petr Kalashnikov authored
-
- Feb 04, 2021
-
-
rha104 authored
Also updated and fixed tests, fixtures and readme
-
- Jan 22, 2021
-
-
rha104 authored
-
- Jan 20, 2021
-
-
rha104 authored
-
- Jan 15, 2021
-
-
rha104 authored
This gives us more options for how to use the function, and makes setra client easier to use in Bookitlab-api (BOOK-17)
-
- Dec 14, 2020
-
-
Jo Sama authored
This allows us to catch more errors that can occour when transferring data to Setra.
-
- Dec 10, 2020
-
-
Jo Sama authored
-
- Aug 21, 2020
-
-
Andreas Ellewsen authored
Introduces SetraClient. The client is made for use against the SETRA(SEntralt TRAnsaksjonslager) API. There are models for Batch, Voucher, Transaction and Multi, where Multi is a combination of the preceding, The Multi model validates that the batchid of the voucher matches the batch included, and that the voucherid of the transactions matches one of the included vouchers. Tests have also been included for the client itself, the endpoints, and the models. Configuration for tox, Jenkins and gitlab-ci are included for running tests and building the client.
-