Coverage for src/henrri_connect/models/base/enums.py: 100%
71 statements
« prev ^ index » next coverage.py v7.14.1, created at 2026-06-09 19:37 +0200
« prev ^ index » next coverage.py v7.14.1, created at 2026-06-09 19:37 +0200
1"""
2Module contenant les énumérations utilisées dans les modèles de données.
4Attributs
5- CustomerType: Type de client pour les clients dans l'API Henrri Connect.
6- SortOrder: Ordre de tri pour les listes d'articles et de catégories d'articles.
7- DocumentKind: Type de document pour les documents commerciaux.
8- DocumentState: État d'un document commercial.
9- DocumentLineKind: Type de ligne pour les lignes de document commercial.
10- UnitKind: Type d'unité pour les unités de mesure.
11- CompanyIdentifierType: Type d'identifiant pour les entreprises.
12- ItemCategoryKind: Type de catégorie d'articles.
13- ItemCategoryContentKind: Type de contenu pour les catégories d'articles.
14"""
15from __future__ import annotations
17from enum import Enum
19class CustomerType(str, Enum):
20 """
21 Type de client pour les clients dans l'API Henrri Connect.
23 Attributs
24 - INDIVIDUAL: Client individuel.
25 - COMPANY: Client entreprise.
26 """
27 INDIVIDUAL = "individual"
28 COMPANY = "professional"
30class SortOrder(str, Enum):
31 """
32 Ordre de tri pour les listes d'articles et de catégories d'articles.
34 Attributs
35 - ASCENDING: Tri ascendant.
36 - DESCENDING: Tri descendant.
37 """
38 ASCENDING = "Ascending"
39 DESCENDING = "Descending"
41class DocumentKind(str, Enum):
42 """
43 Type de document pour les documents commerciaux.
45 Attributs
46 - INVOICE: Facture.
47 - CREDIT_NOTE: Avoir.
48 - DELIVERY_NOTE: Bon de livraison.
49 - QUOTATION: Devis.
50 - WORK_ORDER: Bon de commande.
51 - PROGRESS_INVOICE: Facture de progression.
52 - ORDER: Commande.
53 - AMENDMENT: Avenant.
54 - MISCELLANEOUS: Divers.
55 - SUMMARY: Sommaire.
56 - DEPOSIT_INVOICE: Facture de caution.
57 - DEPOSIT_RECEIPT: Recueil de caution.
58 """
59 INVOICE = "Invoice"
60 CREDIT_NOTE = "CreditNote"
61 DELIVERY_NOTE = "DeliveryNote"
62 QUOTATION = "Quotation"
63 WORK_ORDER = "WorkOrder"
64 PROGRESS_INVOICE = "ProgressInvoice"
65 ORDER = "Order"
66 AMENDMENT = "Amendment"
67 MISCELLANEOUS = "Miscellaneous"
68 SUMMARY = "Summary"
69 DEPOSIT_INVOICE = "DepositInvoice"
70 DEPOSIT_RECEIPT = "DepositReceipt"
72class DocumentState(str, Enum):
73 """
74 État d'un document commercial.
76 Attributs
77 - FINALIZED: Finalisé.
78 - PENDING: En attente.
79 """
80 FINALIZED = "Finalized"
81 PENDING = "Pending"
83class DocumentLineKind(str, Enum):
84 """
85 Type de ligne pour les lignes de document commercial.
87 Attributs
88 - NONE: Aucun.
89 - ITEM: Article.
90 - TOTAL: Total.
91 - SUBTOTAL: Sous-total.
92 - TEXT: Texte.
93 - GROUP: Groupe d'articles.
94 - ADJUSTMENT: Ajustement de groupe d'articles.
95 - LINE_BREAK: Saut de ligne.
96 - HORIZONTAL_TRAIT: Trait horizontal.
97 """
98 NONE = "None"
99 ITEM = "Item"
100 TOTAL = "Total"
101 SUBTOTAL = "Subtotal"
102 TEXT = "Text"
103 GROUP = "Group"
104 ADJUSTMENT = "Adjustment"
105 LINE_BREAK = "LineBreak"
106 HORIZONTAL_TRAIT = "HorizontalTrait"
108class UnitKind(str, Enum):
109 """
110 Type d'unité pour les unités de mesure.
112 Attributs
113 - HOURLY: Horaire.
114 - METER: Mètre.
115 - CENTIMETER: Centimètre.
116 - SQUARE_CENTIMETER: Centimètre carré.
117 - CUBIC_CENTIMETER: Centimètre cube.
118 - DECIMETER: Décimètre.
119 - SQUARE_METER: Mètre carré.
120 - CUBIC_METER: Mètre cube.
121 - MILLIMETER: Millimètre.
122 - SQUARE_MILLIMETER: Millimètre carré.
123 - CUBIC_MILLIMETER: Millimètre cube.
124 - KILOGRAM: Kilogramme.
125 - GRAM: Gramme.
126 - METRIC_TON: Tonne métrique.
127 - SPECIFIC: Spécifique.
128 - FLAT_RATE: Forfait.
129 - LINEAR_METER: Mètre linéaire.
130 - UNIT: Unité.
131 - CUSTOM: Personnalisé.
132 """
133 HOURLY = "Hourly"
134 METER = "Meter"
135 CENTIMETER = "Centimeter"
136 SQUARE_CENTIMETER = "SquareCentimeter"
137 CUBIC_CENTIMETER = "CubicCentimeter"
138 DECIMETER = "Decimeter"
139 SQUARE_METER = "SquareMeter"
140 CUBIC_METER = "CubicMeter"
141 MILLIMETER = "Millimeter"
142 SQUARE_MILLIMETER = "SquareMillimeter"
143 CUBIC_MILLIMETER = "CubicMillimeter"
144 KILOGRAM = "Kilogram"
145 GRAM = "Gram"
146 METRIC_TON = "MetricTon"
147 SPECIFIC = "Specific"
148 FLAT_RATE = "FlatRate"
149 LINEAR_METER = "LinearMeter"
150 UNIT = "Unit"
151 CUSTOM = "Custom"
153class CompanyIdentifierType(str, Enum):
154 """
155 Type d'identifiant pour les entreprises.
157 Attributs
158 - SIRET: SIRET.
159 - BCE: BCE.
160 - UNKNOWN: Inconnu.
161 """
162 SIRET = "Siret"
163 BCE = "Bce"
164 UNKNOWN = "Unknown"
166class ItemCategoryKind(str, Enum):
167 """
168 Type de catégorie d'articles.
170 Attributs
171 - SERVICE: Service.
172 - PRODUCT: Produit.
173 - MIXED: Mixte.
174 """
175 SERVICE = "Service"
176 PRODUCT = "Product"
177 MIXED = "Mixed"
179class ItemCategoryContentKind(str, Enum):
180 """
181 Type de contenu pour les catégories d'articles.
183 Attributs
184 - SUPPLY: Approvisionnement.
185 - FLAT_SERVICE: Service forfaitaire.
186 - HOURLY_SERVICE: Service horaire.
187 - MIXED: Mixte.
188 - SUBCONTRACTING: Sous-traitance.
189 - MACHINE_TIME: Temps machine.
190 - SPECIAL_SALE: Vente spéciale.
191 - USED_VEHICLE: Véhicule d'occasion.
192 """
193 SUPPLY = "Supply"
194 FLAT_SERVICE = "FlatService"
195 HOURLY_SERVICE = "HourlyService"
196 MIXED = "Mixed"
197 SUBCONTRACTING = "Subcontracting"
198 MACHINE_TIME = "MachineTime"
199 SPECIAL_SALE = "SpecialSale"
200 USED_VEHICLE = "UsedVehicle"