-
Notifications
You must be signed in to change notification settings - Fork 5
Add Bankverbindung #884
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
base: main
Are you sure you want to change the base?
Add Bankverbindung #884
Changes from 3 commits
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,38 @@ | ||
| """ | ||
| 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 Optional | ||
|
|
||
| from ..utils import postprocess_docstring | ||
| from .com import COM | ||
|
|
||
|
|
||
| @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 | ||
| # International Bank Account Number = IBAN for example: DE07 1234 1234 1234 1234 12 | ||
|
|
||
| kontoinhaber: Optional[str] = None | ||
| # individual or entity in whose name a bank account is registered and who has legal rights over it | ||
|
|
||
| bankkennung: Optional[str] = None | ||
| # A unique code, such as a BIC (Bank Identifier Code) or SWIFT code, that identifies a specific bank in | ||
| # international transactions (e.g., BIC: DEUTDEFF for Deutsche Bank) | ||
|
|
||
| bankname: Optional[str] = None | ||
|
Comment on lines
+36
to
+37
Collaborator
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
Collaborator
Author
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. |
||
| # name of the bank e.g. Deutsche Bank | ||
|
Contributor
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. kannst du deutsche docstrings drauß machen?
Collaborator
Author
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. hast du ein bsp für mich wie du es genau haben willst?
Collaborator
Author
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. so? |
||
| 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="DE07123412341234123412", | ||
| kontoinhaber="Jürgen W.", | ||
| bankkennung="DEUTDEFF", | ||
| bankname="Deutsche Bank", | ||
| ), | ||
| 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