Skip to content

Commit 4446536

Browse files
committed
data.ref: versioning XML schemas of "factura electrónica"
Move the content of the `schemas-xml` directory into a subdirectory named `2011_05_30`. This name represents the version of these XML schemas according to the last update timestamp of the files in the set. Extra: New enum `cl_sii.base.constants.XmlSchemasVersionEnum` to define the available XML schema versions
1 parent dcec499 commit 4446536

18 files changed

+105
-15
lines changed

cl_sii/base/constants.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
================
44
55
"""
6+
import enum
7+
68
import pytz
79

810
from cl_sii.libs.tz_utils import PytzTimezone
@@ -11,3 +13,19 @@
1113
TZ_CL_SANTIAGO: PytzTimezone = pytz.timezone('America/Santiago')
1214

1315
SII_OFFICIAL_TZ = TZ_CL_SANTIAGO
16+
17+
18+
class XmlSchemasVersionEnum(enum.Enum):
19+
"""
20+
Enum of "SII XML Schema Versions".
21+
The version name is selected considering the last updated timestamp
22+
of the files in the set
23+
24+
"""
25+
26+
V2011_05_30 = '2011_05_30'
27+
28+
@classmethod
29+
def latest(cls) -> "XmlSchemasVersionEnum":
30+
"""Reference to the latest version available"""
31+
return cls.V2011_05_30
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)