-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Bankverbindung #884
base: main
Are you sure you want to change the base?
Add Bankverbindung #884
Changes from 1 commit
39c87b3
fd63324
cc2f306
648d26f
5cff34e
4d33fd6
9c81f0c
345112b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
""" | ||
Contains Bankverbindung class and corresponding marshmallow schema for de-/serialization | ||
""" | ||
|
||
# pylint: disable=too-few-public-methods, too-many-instance-attributes | ||
# pylint: disable=no-name-in-module | ||
from typing import TYPE_CHECKING, Optional | ||
|
||
from ..utils import postprocess_docstring | ||
from .com import COM | ||
|
||
if TYPE_CHECKING: | ||
from ..enum.preismodell import Preismodell | ||
from ..enum.rechnungslegung import Rechnungslegung | ||
from ..enum.sparte import Sparte | ||
from ..enum.vertragsform import Vertragsform | ||
from .ausschreibungsdetail import Ausschreibungsdetail | ||
from .menge import Menge | ||
from .zeitraum import Zeitraum | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. welchen dieser importe verwenden wir hier überhaupt? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
|
||
@postprocess_docstring | ||
class Bankverbindung(COM): | ||
""" | ||
Eine Komponente zur Abbildung einer einzelner Bankverbindung | ||
|
||
.. raw:: html | ||
|
||
<object data="../_static/images/bo4e/com/Bankverbindung.svg" type="image/svg+xml"></object> | ||
|
||
.. HINT:: | ||
`Bankverbindung JSON Schema <https://json-schema.app/view/%23?url=https://raw.githubusercontent.com/BO4E/BO4E-Schemas/{__gh_version__}/src/bo4e_schemas/com/Bankverbindung.json>`_ | ||
|
||
""" | ||
|
||
iban: Optional[str] = None | ||
|
||
kontoinhaber: Optional[str] = None | ||
|
||
bankkennung: Optional[str] = None | ||
|
||
bankname: Optional[str] = None | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wäre ganz gut, hier docstrings zu haben. Insbesondere bei There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import pytest | ||
|
||
from bo4e import Bankverbindung | ||
from tests.serialization_helper import assert_serialization_roundtrip | ||
|
||
|
||
class TestBankverbindung: | ||
@pytest.mark.parametrize( | ||
"bankverbindung", | ||
[ | ||
pytest.param( | ||
Bankverbindung( | ||
iban="foo-ban", | ||
kontoinhaber="Jürgen W.", | ||
bankkennung="1234Geiz5678", | ||
bankname="Geiz&Geiziger", | ||
), | ||
id="maximal attributes", | ||
), | ||
], | ||
) | ||
def test_serialization_roundtrip(self, bankverbindung: Bankverbindung) -> None: | ||
""" | ||
Test de-/serialisation of Ausschreibungslos | ||
""" | ||
assert_serialization_roundtrip(bankverbindung) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Das sollte alphabetisch einsortiert sein
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oder wird das hier irgendwie so autogeneriert?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ne händisch, ich meine aber dass mir gesagt wurde dass das aber auto sortiert werden soll