Skip to content
Snippets Groups Projects

OM46, del 1: Support batch_complete endpoint from setra

Merged Petr.Kalashnikov requested to merge om46 into master
All threads resolved!
3 files
+ 3
108
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 3
25
@@ -31,14 +31,10 @@ class BaseModel(pydantic.BaseModel):
@@ -31,14 +31,10 @@ class BaseModel(pydantic.BaseModel):
return cls.from_dict(data)
return cls.from_dict(data)
class Transaction(BaseModel):
class Transaction(BaseModel):
id: Optional[str]
voucher_id: Optional[str]
created: Optional[datetime.datetime]
account: str
account: str
amount: float
amount: float
transdate: Optional[datetime.datetime]
transdate: Optional[datetime.date]
curamount: Optional[float]
curamount: Optional[float]
currency: Optional[str]
currency: Optional[str]
description: str
description: str
@@ -56,36 +52,18 @@ class Transaction(BaseModel):
@@ -56,36 +52,18 @@ class Transaction(BaseModel):
class Voucher(BaseModel):
class Voucher(BaseModel):
id: Optional[str]
voucherdate: Optional[datetime.date]
batch_id: Optional[str]
created: Optional[datetime.datetime]
voucherdate: Optional[datetime.datetime]
exref: Optional[str]
exref: Optional[str]
voucherno: int
voucherno: int
voucherno_ubw: Optional[str]
voucherno_ubw_wflow: Optional[str]
vouchertype: Optional[str]
transactions: typing.List[Transaction]
transactions: typing.List[Transaction]
class Batch(BaseModel):
class Batch(BaseModel):
"""Model representing a batch, with a list of vouchers (and each voucher has a list of transactions)"""
"""Model representing a batch, with a list of vouchers (and each voucher has a list of transactions)"""
client: str
client: str
created: Optional[datetime.datetime]
batchid: str
batchid: str
period: str
period: str
interface: str
interface: str
vouchertype: typing.Optional[str]
vouchertype: typing.Optional[str]
vouchers: typing.List[Voucher]
vouchers: typing.List[Voucher]
batch_validated_ok_date: Optional[datetime.datetime]
batch_rejected_code: Optional[str]
sent_date: Optional[datetime.datetime]
http_response_content: Optional[str]
http_response_code: Optional[datetime.datetime]
orderno: Optional[datetime.datetime]
polling_statuscode: Optional[str]
polling_statuscode_date: Optional[datetime.datetime]
getresult_date: Optional[datetime.datetime]
getresult_statuscode: Optional[str]
getresult_logg: Optional[str]
getresult_report: Optional[str]
Loading