diff --git a/setra_client/models.py b/setra_client/models.py index 195cf2591423193f5a4e4a180f720aac22b41ae3..7f7727e5543a9932ea43b8e4d90d05aa2649edd7 100644 --- a/setra_client/models.py +++ b/setra_client/models.py @@ -33,7 +33,7 @@ class BaseModel(pydantic.BaseModel): class Transaction(BaseModel): account: str amount: float - transdate: Optional[datetime.date] + transdate: Optional[datetime.datetime] curamount: Optional[float] currency: Optional[str] description: str @@ -51,7 +51,7 @@ class Transaction(BaseModel): class Voucher(BaseModel): - voucherdate: Optional[datetime.date] + voucherdate: datetime.datetime exref: Optional[str] voucherno: int transactions: typing.List[Transaction] diff --git a/tests/fixtures/batch_with_voucher_fixture.json b/tests/fixtures/batch_with_voucher_fixture.json index 97b0b95de665340ae5e9a8d600b3095aa69fcad8..3cda7323ee6585fd1c70235ea22eb019a2e9b8f7 100644 --- a/tests/fixtures/batch_with_voucher_fixture.json +++ b/tests/fixtures/batch_with_voucher_fixture.json @@ -8,12 +8,12 @@ { "exref": 1, "voucherno": 66, + "voucherdate": "2020-10-14 00:00", "transactions": [ { - "voucherid": 66, "account": 1, "amount": 1, - "transdate": 1, + "transdate": "2020-10-14 00:00", "curamount": 1, "currency": 1, "description": 1, @@ -30,10 +30,9 @@ "extinvref": 1 }, { - "voucherid": 66, "account": 2, "amount": 2, - "transdate": 2, + "transdate": "2020-10-14 00:00", "curamount": 2, "currency": 2, "description": 2, diff --git a/tests/fixtures/voucher_fixture.json b/tests/fixtures/voucher_fixture.json index 679a9cc989930b146bd721b4e2299f47c0928564..a20406ad1ea746572d34d1b19331f50c0c4ffffc 100644 --- a/tests/fixtures/voucher_fixture.json +++ b/tests/fixtures/voucher_fixture.json @@ -1,6 +1,7 @@ { "exref": 3, "voucherno": 4, + "voucherdate": "2020-10-14 00:00", "transactions": [ { "voucherid": 66,