Skip to content

Commit

Permalink
fix: Fix object ordering (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuyKh authored Nov 6, 2024
1 parent 1662cea commit e2da0cf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions iec_api/models/invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,6 @@ class Invoice(DataClassDictMixin):
invoice_id: int = field(metadata=field_options(alias="invoiceId"))
contract_number: int = field(metadata=field_options(alias="contractNumber"))
order_number: int = field(metadata=field_options(alias="orderNumber"))
full_date: Optional[datetime] = field(default=None, metadata=field_options(alias="fullDate"))
from_date: Optional[datetime] = field(default=None, metadata=field_options(alias="fromDate"))
to_date: Optional[datetime] = field(default=None, metadata=field_options(alias="toDate"))
last_date: Optional[date] = field(
default=None, metadata=field_options(alias="lastDate", serialization_strategy=FormattedDate("%d/%m/%Y"))
)
invoice_payment_status: int = field(metadata=field_options(alias="invoicePaymentStatus"))
document_id: str = field(metadata=field_options(alias="documentID"))
days_period: str = field(metadata=field_options(alias="daysPeriod"))
Expand All @@ -82,6 +76,12 @@ class Invoice(DataClassDictMixin):
meter_readings: list[MeterReading] = field(
metadata=field_options(alias="meterReadings"), default_factory=lambda: []
)
full_date: Optional[datetime] = field(default=None, metadata=field_options(alias="fullDate"))
from_date: Optional[datetime] = field(default=None, metadata=field_options(alias="fromDate"))
to_date: Optional[datetime] = field(default=None, metadata=field_options(alias="toDate"))
last_date: Optional[date] = field(
default=None, metadata=field_options(alias="lastDate", serialization_strategy=FormattedDate("%d/%m/%Y"))
)

@classmethod
def __post_deserialize__(cls, obj: "Invoice") -> "Invoice":
Expand Down

0 comments on commit e2da0cf

Please sign in to comment.