factpulse 1.0.6__py3-none-any.whl → 2.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- factpulse/__init__.py +17 -23
- factpulse/api/__init__.py +0 -2
- factpulse/api/afnorpdppa_directory_service_api.py +4293 -64
- factpulse/api_client.py +1 -1
- factpulse/configuration.py +1 -1
- factpulse/exceptions.py +5 -2
- factpulse/models/__init__.py +8 -9
- factpulse/models/ligne_de_poste.py +6 -6
- factpulse/models/ligne_de_tva.py +6 -6
- factpulse/models/{montantapayer.py → montant_a_payer.py} +4 -4
- factpulse/models/{montantbaseht.py → montant_base_ht.py} +4 -4
- factpulse/models/montant_ht_total.py +3 -3
- factpulse/models/{montantttctotal.py → montant_ht_total1.py} +8 -8
- factpulse/models/{montant_total_montant_remise_globale_ttc.py → montant_remise_globale_ttc.py} +5 -5
- factpulse/models/montant_total.py +15 -15
- factpulse/models/{ligne_de_poste_montant_total_ligne_ht.py → montant_total_ligne_ht.py} +5 -5
- factpulse/models/montant_ttc_total.py +3 -3
- factpulse/models/{montanttva.py → montant_ttc_total1.py} +8 -8
- factpulse/models/montant_tva.py +3 -3
- factpulse/models/{montanttva1.py → montant_tva1.py} +4 -4
- factpulse/models/{montantunitaireht.py → montant_unitaire_ht.py} +4 -4
- factpulse/models/options_processing.py +4 -13
- factpulse/models/soumettre_facture_request.py +18 -6
- factpulse/models/statut_tache.py +2 -5
- {factpulse-1.0.6.dist-info → factpulse-2.0.2.dist-info}/METADATA +2 -2
- {factpulse-1.0.6.dist-info → factpulse-2.0.2.dist-info}/RECORD +29 -32
- factpulse/api/processing_endpoints_unifis_api.py +0 -592
- factpulse/api/signature_lectronique_api.py +0 -1358
- factpulse/models/montanthttotal.py +0 -139
- {factpulse-1.0.6.dist-info → factpulse-2.0.2.dist-info}/WHEEL +0 -0
- {factpulse-1.0.6.dist-info → factpulse-2.0.2.dist-info}/licenses/LICENSE +0 -0
- {factpulse-1.0.6.dist-info → factpulse-2.0.2.dist-info}/top_level.txt +0 -0
factpulse/api_client.py
CHANGED
|
@@ -91,7 +91,7 @@ class ApiClient:
|
|
|
91
91
|
self.default_headers[header_name] = header_value
|
|
92
92
|
self.cookie = cookie
|
|
93
93
|
# Set default User-Agent.
|
|
94
|
-
self.user_agent = 'OpenAPI-Generator/
|
|
94
|
+
self.user_agent = 'OpenAPI-Generator/2.0.2/python'
|
|
95
95
|
self.client_side_validation = configuration.client_side_validation
|
|
96
96
|
|
|
97
97
|
def __enter__(self):
|
factpulse/configuration.py
CHANGED
|
@@ -514,7 +514,7 @@ class Configuration:
|
|
|
514
514
|
"OS: {env}\n"\
|
|
515
515
|
"Python Version: {pyversion}\n"\
|
|
516
516
|
"Version of the API: 1.0.0\n"\
|
|
517
|
-
"SDK Package Version:
|
|
517
|
+
"SDK Package Version: 2.0.2".\
|
|
518
518
|
format(env=sys.platform, pyversion=sys.version)
|
|
519
519
|
|
|
520
520
|
def get_host_settings(self) -> List[HostSetting]:
|
factpulse/exceptions.py
CHANGED
|
@@ -169,8 +169,11 @@ class ApiException(OpenApiException):
|
|
|
169
169
|
error_message += "HTTP response headers: {0}\n".format(
|
|
170
170
|
self.headers)
|
|
171
171
|
|
|
172
|
-
if self.
|
|
173
|
-
error_message += "HTTP response body: {0}\n".format(self.
|
|
172
|
+
if self.body:
|
|
173
|
+
error_message += "HTTP response body: {0}\n".format(self.body)
|
|
174
|
+
|
|
175
|
+
if self.data:
|
|
176
|
+
error_message += "HTTP response data: {0}\n".format(self.data)
|
|
174
177
|
|
|
175
178
|
return error_message
|
|
176
179
|
|
factpulse/models/__init__.py
CHANGED
|
@@ -56,24 +56,23 @@ from factpulse.models.http_validation_error import HTTPValidationError
|
|
|
56
56
|
from factpulse.models.information_signature_api import InformationSignatureAPI
|
|
57
57
|
from factpulse.models.ligne_de_poste import LigneDePoste
|
|
58
58
|
from factpulse.models.ligne_de_poste_montant_remise_ht import LigneDePosteMontantRemiseHt
|
|
59
|
-
from factpulse.models.ligne_de_poste_montant_total_ligne_ht import LigneDePosteMontantTotalLigneHt
|
|
60
59
|
from factpulse.models.ligne_de_poste_taux_tva_manuel import LigneDePosteTauxTvaManuel
|
|
61
60
|
from factpulse.models.ligne_de_tva import LigneDeTVA
|
|
62
61
|
from factpulse.models.mode_depot import ModeDepot
|
|
63
62
|
from factpulse.models.mode_paiement import ModePaiement
|
|
63
|
+
from factpulse.models.montant_a_payer import MontantAPayer
|
|
64
|
+
from factpulse.models.montant_base_ht import MontantBaseHt
|
|
64
65
|
from factpulse.models.montant_ht_total import MontantHtTotal
|
|
66
|
+
from factpulse.models.montant_ht_total1 import MontantHtTotal1
|
|
67
|
+
from factpulse.models.montant_remise_globale_ttc import MontantRemiseGlobaleTtc
|
|
65
68
|
from factpulse.models.montant_total import MontantTotal
|
|
66
69
|
from factpulse.models.montant_total_acompte import MontantTotalAcompte
|
|
67
|
-
from factpulse.models.
|
|
70
|
+
from factpulse.models.montant_total_ligne_ht import MontantTotalLigneHt
|
|
68
71
|
from factpulse.models.montant_ttc_total import MontantTtcTotal
|
|
72
|
+
from factpulse.models.montant_ttc_total1 import MontantTtcTotal1
|
|
69
73
|
from factpulse.models.montant_tva import MontantTva
|
|
70
|
-
from factpulse.models.
|
|
71
|
-
from factpulse.models.
|
|
72
|
-
from factpulse.models.montanthttotal import Montanthttotal
|
|
73
|
-
from factpulse.models.montantttctotal import Montantttctotal
|
|
74
|
-
from factpulse.models.montanttva import Montanttva
|
|
75
|
-
from factpulse.models.montanttva1 import Montanttva1
|
|
76
|
-
from factpulse.models.montantunitaireht import Montantunitaireht
|
|
74
|
+
from factpulse.models.montant_tva1 import MontantTva1
|
|
75
|
+
from factpulse.models.montant_unitaire_ht import MontantUnitaireHt
|
|
77
76
|
from factpulse.models.obtenir_id_chorus_pro_request import ObtenirIdChorusProRequest
|
|
78
77
|
from factpulse.models.obtenir_id_chorus_pro_response import ObtenirIdChorusProResponse
|
|
79
78
|
from factpulse.models.options_processing import OptionsProcessing
|
|
@@ -22,9 +22,9 @@ from typing import Any, ClassVar, Dict, List, Optional
|
|
|
22
22
|
from factpulse.models.categorie_tva import CategorieTVA
|
|
23
23
|
from factpulse.models.code_raison_reduction import CodeRaisonReduction
|
|
24
24
|
from factpulse.models.ligne_de_poste_montant_remise_ht import LigneDePosteMontantRemiseHt
|
|
25
|
-
from factpulse.models.ligne_de_poste_montant_total_ligne_ht import LigneDePosteMontantTotalLigneHt
|
|
26
25
|
from factpulse.models.ligne_de_poste_taux_tva_manuel import LigneDePosteTauxTvaManuel
|
|
27
|
-
from factpulse.models.
|
|
26
|
+
from factpulse.models.montant_total_ligne_ht import MontantTotalLigneHt
|
|
27
|
+
from factpulse.models.montant_unitaire_ht import MontantUnitaireHt
|
|
28
28
|
from factpulse.models.quantite import Quantite
|
|
29
29
|
from factpulse.models.unite import Unite
|
|
30
30
|
from typing import Optional, Set
|
|
@@ -39,9 +39,9 @@ class LigneDePoste(BaseModel):
|
|
|
39
39
|
denomination: StrictStr
|
|
40
40
|
quantite: Quantite
|
|
41
41
|
unite: Unite
|
|
42
|
-
montant_unitaire_ht:
|
|
42
|
+
montant_unitaire_ht: MontantUnitaireHt = Field(alias="montantUnitaireHt")
|
|
43
43
|
montant_remise_ht: Optional[LigneDePosteMontantRemiseHt] = Field(default=None, alias="montantRemiseHt")
|
|
44
|
-
montant_total_ligne_ht: Optional[
|
|
44
|
+
montant_total_ligne_ht: Optional[MontantTotalLigneHt] = Field(default=None, alias="montantTotalLigneHt")
|
|
45
45
|
taux_tva: Optional[StrictStr] = Field(default=None, alias="tauxTva")
|
|
46
46
|
taux_tva_manuel: Optional[LigneDePosteTauxTvaManuel] = Field(default=None, alias="tauxTvaManuel")
|
|
47
47
|
categorie_tva: Optional[CategorieTVA] = Field(default=None, alias="categorieTva")
|
|
@@ -172,9 +172,9 @@ class LigneDePoste(BaseModel):
|
|
|
172
172
|
"denomination": obj.get("denomination"),
|
|
173
173
|
"quantite": Quantite.from_dict(obj["quantite"]) if obj.get("quantite") is not None else None,
|
|
174
174
|
"unite": obj.get("unite"),
|
|
175
|
-
"montantUnitaireHt":
|
|
175
|
+
"montantUnitaireHt": MontantUnitaireHt.from_dict(obj["montantUnitaireHt"]) if obj.get("montantUnitaireHt") is not None else None,
|
|
176
176
|
"montantRemiseHt": LigneDePosteMontantRemiseHt.from_dict(obj["montantRemiseHt"]) if obj.get("montantRemiseHt") is not None else None,
|
|
177
|
-
"montantTotalLigneHt":
|
|
177
|
+
"montantTotalLigneHt": MontantTotalLigneHt.from_dict(obj["montantTotalLigneHt"]) if obj.get("montantTotalLigneHt") is not None else None,
|
|
178
178
|
"tauxTva": obj.get("tauxTva"),
|
|
179
179
|
"tauxTvaManuel": LigneDePosteTauxTvaManuel.from_dict(obj["tauxTvaManuel"]) if obj.get("tauxTvaManuel") is not None else None,
|
|
180
180
|
"categorieTva": obj.get("categorieTva"),
|
factpulse/models/ligne_de_tva.py
CHANGED
|
@@ -20,8 +20,8 @@ import json
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
22
|
from factpulse.models.categorie_tva import CategorieTVA
|
|
23
|
-
from factpulse.models.
|
|
24
|
-
from factpulse.models.
|
|
23
|
+
from factpulse.models.montant_base_ht import MontantBaseHt
|
|
24
|
+
from factpulse.models.montant_tva import MontantTva
|
|
25
25
|
from factpulse.models.tauxmanuel import Tauxmanuel
|
|
26
26
|
from typing import Optional, Set
|
|
27
27
|
from typing_extensions import Self
|
|
@@ -30,8 +30,8 @@ class LigneDeTVA(BaseModel):
|
|
|
30
30
|
"""
|
|
31
31
|
Représente une ligne de totalisation par taux de TVA.
|
|
32
32
|
""" # noqa: E501
|
|
33
|
-
montant_base_ht:
|
|
34
|
-
montant_tva:
|
|
33
|
+
montant_base_ht: MontantBaseHt = Field(alias="montantBaseHt")
|
|
34
|
+
montant_tva: MontantTva = Field(alias="montantTva")
|
|
35
35
|
taux: Optional[StrictStr] = None
|
|
36
36
|
taux_manuel: Optional[Tauxmanuel] = Field(default=None, alias="tauxManuel")
|
|
37
37
|
categorie: Optional[CategorieTVA] = None
|
|
@@ -107,8 +107,8 @@ class LigneDeTVA(BaseModel):
|
|
|
107
107
|
return cls.model_validate(obj)
|
|
108
108
|
|
|
109
109
|
_obj = cls.model_validate({
|
|
110
|
-
"montantBaseHt":
|
|
111
|
-
"montantTva":
|
|
110
|
+
"montantBaseHt": MontantBaseHt.from_dict(obj["montantBaseHt"]) if obj.get("montantBaseHt") is not None else None,
|
|
111
|
+
"montantTva": MontantTva.from_dict(obj["montantTva"]) if obj.get("montantTva") is not None else None,
|
|
112
112
|
"taux": obj.get("taux"),
|
|
113
113
|
"tauxManuel": Tauxmanuel.from_dict(obj["tauxManuel"]) if obj.get("tauxManuel") is not None else None,
|
|
114
114
|
"categorie": obj.get("categorie")
|
|
@@ -26,7 +26,7 @@ from pydantic import Field
|
|
|
26
26
|
|
|
27
27
|
MONTANTAPAYER_ANY_OF_SCHEMAS = ["float", "str"]
|
|
28
28
|
|
|
29
|
-
class
|
|
29
|
+
class MontantAPayer(BaseModel):
|
|
30
30
|
"""
|
|
31
31
|
Montant à payer.
|
|
32
32
|
"""
|
|
@@ -58,7 +58,7 @@ class Montantapayer(BaseModel):
|
|
|
58
58
|
|
|
59
59
|
@field_validator('actual_instance')
|
|
60
60
|
def actual_instance_must_validate_anyof(cls, v):
|
|
61
|
-
instance =
|
|
61
|
+
instance = MontantAPayer.model_construct()
|
|
62
62
|
error_messages = []
|
|
63
63
|
# validate data type: float
|
|
64
64
|
try:
|
|
@@ -74,7 +74,7 @@ class Montantapayer(BaseModel):
|
|
|
74
74
|
error_messages.append(str(e))
|
|
75
75
|
if error_messages:
|
|
76
76
|
# no match
|
|
77
|
-
raise ValueError("No match found when setting the actual_instance in
|
|
77
|
+
raise ValueError("No match found when setting the actual_instance in MontantAPayer with anyOf schemas: float, str. Details: " + ", ".join(error_messages))
|
|
78
78
|
else:
|
|
79
79
|
return v
|
|
80
80
|
|
|
@@ -108,7 +108,7 @@ class Montantapayer(BaseModel):
|
|
|
108
108
|
|
|
109
109
|
if error_messages:
|
|
110
110
|
# no match
|
|
111
|
-
raise ValueError("No match found when deserializing the JSON string into
|
|
111
|
+
raise ValueError("No match found when deserializing the JSON string into MontantAPayer with anyOf schemas: float, str. Details: " + ", ".join(error_messages))
|
|
112
112
|
else:
|
|
113
113
|
return instance
|
|
114
114
|
|
|
@@ -26,7 +26,7 @@ from pydantic import Field
|
|
|
26
26
|
|
|
27
27
|
MONTANTBASEHT_ANY_OF_SCHEMAS = ["float", "str"]
|
|
28
28
|
|
|
29
|
-
class
|
|
29
|
+
class MontantBaseHt(BaseModel):
|
|
30
30
|
"""
|
|
31
31
|
Montant de la base HT pour cette ligne de TVA.
|
|
32
32
|
"""
|
|
@@ -58,7 +58,7 @@ class Montantbaseht(BaseModel):
|
|
|
58
58
|
|
|
59
59
|
@field_validator('actual_instance')
|
|
60
60
|
def actual_instance_must_validate_anyof(cls, v):
|
|
61
|
-
instance =
|
|
61
|
+
instance = MontantBaseHt.model_construct()
|
|
62
62
|
error_messages = []
|
|
63
63
|
# validate data type: float
|
|
64
64
|
try:
|
|
@@ -74,7 +74,7 @@ class Montantbaseht(BaseModel):
|
|
|
74
74
|
error_messages.append(str(e))
|
|
75
75
|
if error_messages:
|
|
76
76
|
# no match
|
|
77
|
-
raise ValueError("No match found when setting the actual_instance in
|
|
77
|
+
raise ValueError("No match found when setting the actual_instance in MontantBaseHt with anyOf schemas: float, str. Details: " + ", ".join(error_messages))
|
|
78
78
|
else:
|
|
79
79
|
return v
|
|
80
80
|
|
|
@@ -108,7 +108,7 @@ class Montantbaseht(BaseModel):
|
|
|
108
108
|
|
|
109
109
|
if error_messages:
|
|
110
110
|
# no match
|
|
111
|
-
raise ValueError("No match found when deserializing the JSON string into
|
|
111
|
+
raise ValueError("No match found when deserializing the JSON string into MontantBaseHt with anyOf schemas: float, str. Details: " + ", ".join(error_messages))
|
|
112
112
|
else:
|
|
113
113
|
return instance
|
|
114
114
|
|
|
@@ -17,7 +17,7 @@ from inspect import getfullargspec
|
|
|
17
17
|
import json
|
|
18
18
|
import pprint
|
|
19
19
|
import re # noqa: F401
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field,
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
|
|
21
21
|
from typing import Optional, Union
|
|
22
22
|
from typing_extensions import Annotated
|
|
23
23
|
from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict
|
|
@@ -28,11 +28,11 @@ MONTANTHTTOTAL_ANY_OF_SCHEMAS = ["float", "str"]
|
|
|
28
28
|
|
|
29
29
|
class MontantHtTotal(BaseModel):
|
|
30
30
|
"""
|
|
31
|
-
|
|
31
|
+
Montant total HT.
|
|
32
32
|
"""
|
|
33
33
|
|
|
34
34
|
# data type: float
|
|
35
|
-
anyof_schema_1_validator: Optional[Union[
|
|
35
|
+
anyof_schema_1_validator: Optional[Union[Annotated[float, Field(strict=True, ge=0.0)], Annotated[int, Field(strict=True, ge=0)]]] = None
|
|
36
36
|
# data type: str
|
|
37
37
|
anyof_schema_2_validator: Optional[Annotated[str, Field(strict=True)]] = None
|
|
38
38
|
if TYPE_CHECKING:
|
|
@@ -17,22 +17,22 @@ from inspect import getfullargspec
|
|
|
17
17
|
import json
|
|
18
18
|
import pprint
|
|
19
19
|
import re # noqa: F401
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, ValidationError, field_validator
|
|
21
21
|
from typing import Optional, Union
|
|
22
22
|
from typing_extensions import Annotated
|
|
23
23
|
from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict
|
|
24
24
|
from typing_extensions import Literal, Self
|
|
25
25
|
from pydantic import Field
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
MONTANTHTTOTAL1_ANY_OF_SCHEMAS = ["float", "str"]
|
|
28
28
|
|
|
29
|
-
class
|
|
29
|
+
class MontantHtTotal1(BaseModel):
|
|
30
30
|
"""
|
|
31
|
-
Montant total
|
|
31
|
+
Montant HT total
|
|
32
32
|
"""
|
|
33
33
|
|
|
34
34
|
# data type: float
|
|
35
|
-
anyof_schema_1_validator: Optional[Union[
|
|
35
|
+
anyof_schema_1_validator: Optional[Union[StrictFloat, StrictInt]] = None
|
|
36
36
|
# data type: str
|
|
37
37
|
anyof_schema_2_validator: Optional[Annotated[str, Field(strict=True)]] = None
|
|
38
38
|
if TYPE_CHECKING:
|
|
@@ -58,7 +58,7 @@ class Montantttctotal(BaseModel):
|
|
|
58
58
|
|
|
59
59
|
@field_validator('actual_instance')
|
|
60
60
|
def actual_instance_must_validate_anyof(cls, v):
|
|
61
|
-
instance =
|
|
61
|
+
instance = MontantHtTotal1.model_construct()
|
|
62
62
|
error_messages = []
|
|
63
63
|
# validate data type: float
|
|
64
64
|
try:
|
|
@@ -74,7 +74,7 @@ class Montantttctotal(BaseModel):
|
|
|
74
74
|
error_messages.append(str(e))
|
|
75
75
|
if error_messages:
|
|
76
76
|
# no match
|
|
77
|
-
raise ValueError("No match found when setting the actual_instance in
|
|
77
|
+
raise ValueError("No match found when setting the actual_instance in MontantHtTotal1 with anyOf schemas: float, str. Details: " + ", ".join(error_messages))
|
|
78
78
|
else:
|
|
79
79
|
return v
|
|
80
80
|
|
|
@@ -108,7 +108,7 @@ class Montantttctotal(BaseModel):
|
|
|
108
108
|
|
|
109
109
|
if error_messages:
|
|
110
110
|
# no match
|
|
111
|
-
raise ValueError("No match found when deserializing the JSON string into
|
|
111
|
+
raise ValueError("No match found when deserializing the JSON string into MontantHtTotal1 with anyOf schemas: float, str. Details: " + ", ".join(error_messages))
|
|
112
112
|
else:
|
|
113
113
|
return instance
|
|
114
114
|
|
factpulse/models/{montant_total_montant_remise_globale_ttc.py → montant_remise_globale_ttc.py}
RENAMED
|
@@ -24,9 +24,9 @@ from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict
|
|
|
24
24
|
from typing_extensions import Literal, Self
|
|
25
25
|
from pydantic import Field
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
MONTANTREMISEGLOBALETTC_ANY_OF_SCHEMAS = ["float", "str"]
|
|
28
28
|
|
|
29
|
-
class
|
|
29
|
+
class MontantRemiseGlobaleTtc(BaseModel):
|
|
30
30
|
"""
|
|
31
31
|
Montant de la remise globale TTC.
|
|
32
32
|
"""
|
|
@@ -61,7 +61,7 @@ class MontantTotalMontantRemiseGlobaleTtc(BaseModel):
|
|
|
61
61
|
if v is None:
|
|
62
62
|
return v
|
|
63
63
|
|
|
64
|
-
instance =
|
|
64
|
+
instance = MontantRemiseGlobaleTtc.model_construct()
|
|
65
65
|
error_messages = []
|
|
66
66
|
# validate data type: float
|
|
67
67
|
try:
|
|
@@ -77,7 +77,7 @@ class MontantTotalMontantRemiseGlobaleTtc(BaseModel):
|
|
|
77
77
|
error_messages.append(str(e))
|
|
78
78
|
if error_messages:
|
|
79
79
|
# no match
|
|
80
|
-
raise ValueError("No match found when setting the actual_instance in
|
|
80
|
+
raise ValueError("No match found when setting the actual_instance in MontantRemiseGlobaleTtc with anyOf schemas: float, str. Details: " + ", ".join(error_messages))
|
|
81
81
|
else:
|
|
82
82
|
return v
|
|
83
83
|
|
|
@@ -114,7 +114,7 @@ class MontantTotalMontantRemiseGlobaleTtc(BaseModel):
|
|
|
114
114
|
|
|
115
115
|
if error_messages:
|
|
116
116
|
# no match
|
|
117
|
-
raise ValueError("No match found when deserializing the JSON string into
|
|
117
|
+
raise ValueError("No match found when deserializing the JSON string into MontantRemiseGlobaleTtc with anyOf schemas: float, str. Details: " + ", ".join(error_messages))
|
|
118
118
|
else:
|
|
119
119
|
return instance
|
|
120
120
|
|
|
@@ -19,12 +19,12 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from factpulse.models.montant_a_payer import MontantAPayer
|
|
23
|
+
from factpulse.models.montant_ht_total import MontantHtTotal
|
|
24
|
+
from factpulse.models.montant_remise_globale_ttc import MontantRemiseGlobaleTtc
|
|
22
25
|
from factpulse.models.montant_total_acompte import MontantTotalAcompte
|
|
23
|
-
from factpulse.models.
|
|
24
|
-
from factpulse.models.
|
|
25
|
-
from factpulse.models.montanthttotal import Montanthttotal
|
|
26
|
-
from factpulse.models.montantttctotal import Montantttctotal
|
|
27
|
-
from factpulse.models.montanttva1 import Montanttva1
|
|
26
|
+
from factpulse.models.montant_ttc_total import MontantTtcTotal
|
|
27
|
+
from factpulse.models.montant_tva1 import MontantTva1
|
|
28
28
|
from typing import Optional, Set
|
|
29
29
|
from typing_extensions import Self
|
|
30
30
|
|
|
@@ -32,12 +32,12 @@ class MontantTotal(BaseModel):
|
|
|
32
32
|
"""
|
|
33
33
|
Contient tous les montants totaux de la facture.
|
|
34
34
|
""" # noqa: E501
|
|
35
|
-
montant_ht_total:
|
|
36
|
-
montant_tva:
|
|
37
|
-
montant_ttc_total:
|
|
38
|
-
montant_a_payer:
|
|
35
|
+
montant_ht_total: MontantHtTotal = Field(alias="montantHtTotal")
|
|
36
|
+
montant_tva: MontantTva1 = Field(alias="montantTva")
|
|
37
|
+
montant_ttc_total: MontantTtcTotal = Field(alias="montantTtcTotal")
|
|
38
|
+
montant_a_payer: MontantAPayer = Field(alias="montantAPayer")
|
|
39
39
|
acompte: Optional[MontantTotalAcompte] = None
|
|
40
|
-
montant_remise_globale_ttc: Optional[
|
|
40
|
+
montant_remise_globale_ttc: Optional[MontantRemiseGlobaleTtc] = Field(default=None, alias="montantRemiseGlobaleTtc")
|
|
41
41
|
motif_remise_globale_ttc: Optional[StrictStr] = Field(default=None, alias="motifRemiseGlobaleTtc")
|
|
42
42
|
__properties: ClassVar[List[str]] = ["montantHtTotal", "montantTva", "montantTtcTotal", "montantAPayer", "acompte", "montantRemiseGlobaleTtc", "motifRemiseGlobaleTtc"]
|
|
43
43
|
|
|
@@ -125,12 +125,12 @@ class MontantTotal(BaseModel):
|
|
|
125
125
|
return cls.model_validate(obj)
|
|
126
126
|
|
|
127
127
|
_obj = cls.model_validate({
|
|
128
|
-
"montantHtTotal":
|
|
129
|
-
"montantTva":
|
|
130
|
-
"montantTtcTotal":
|
|
131
|
-
"montantAPayer":
|
|
128
|
+
"montantHtTotal": MontantHtTotal.from_dict(obj["montantHtTotal"]) if obj.get("montantHtTotal") is not None else None,
|
|
129
|
+
"montantTva": MontantTva1.from_dict(obj["montantTva"]) if obj.get("montantTva") is not None else None,
|
|
130
|
+
"montantTtcTotal": MontantTtcTotal.from_dict(obj["montantTtcTotal"]) if obj.get("montantTtcTotal") is not None else None,
|
|
131
|
+
"montantAPayer": MontantAPayer.from_dict(obj["montantAPayer"]) if obj.get("montantAPayer") is not None else None,
|
|
132
132
|
"acompte": MontantTotalAcompte.from_dict(obj["acompte"]) if obj.get("acompte") is not None else None,
|
|
133
|
-
"montantRemiseGlobaleTtc":
|
|
133
|
+
"montantRemiseGlobaleTtc": MontantRemiseGlobaleTtc.from_dict(obj["montantRemiseGlobaleTtc"]) if obj.get("montantRemiseGlobaleTtc") is not None else None,
|
|
134
134
|
"motifRemiseGlobaleTtc": obj.get("motifRemiseGlobaleTtc")
|
|
135
135
|
})
|
|
136
136
|
return _obj
|
|
@@ -24,9 +24,9 @@ from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict
|
|
|
24
24
|
from typing_extensions import Literal, Self
|
|
25
25
|
from pydantic import Field
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
MONTANTTOTALLIGNEHT_ANY_OF_SCHEMAS = ["float", "str"]
|
|
28
28
|
|
|
29
|
-
class
|
|
29
|
+
class MontantTotalLigneHt(BaseModel):
|
|
30
30
|
"""
|
|
31
31
|
Montant total HT de la ligne (quantité × prix unitaire - remise).
|
|
32
32
|
"""
|
|
@@ -61,7 +61,7 @@ class LigneDePosteMontantTotalLigneHt(BaseModel):
|
|
|
61
61
|
if v is None:
|
|
62
62
|
return v
|
|
63
63
|
|
|
64
|
-
instance =
|
|
64
|
+
instance = MontantTotalLigneHt.model_construct()
|
|
65
65
|
error_messages = []
|
|
66
66
|
# validate data type: float
|
|
67
67
|
try:
|
|
@@ -77,7 +77,7 @@ class LigneDePosteMontantTotalLigneHt(BaseModel):
|
|
|
77
77
|
error_messages.append(str(e))
|
|
78
78
|
if error_messages:
|
|
79
79
|
# no match
|
|
80
|
-
raise ValueError("No match found when setting the actual_instance in
|
|
80
|
+
raise ValueError("No match found when setting the actual_instance in MontantTotalLigneHt with anyOf schemas: float, str. Details: " + ", ".join(error_messages))
|
|
81
81
|
else:
|
|
82
82
|
return v
|
|
83
83
|
|
|
@@ -114,7 +114,7 @@ class LigneDePosteMontantTotalLigneHt(BaseModel):
|
|
|
114
114
|
|
|
115
115
|
if error_messages:
|
|
116
116
|
# no match
|
|
117
|
-
raise ValueError("No match found when deserializing the JSON string into
|
|
117
|
+
raise ValueError("No match found when deserializing the JSON string into MontantTotalLigneHt with anyOf schemas: float, str. Details: " + ", ".join(error_messages))
|
|
118
118
|
else:
|
|
119
119
|
return instance
|
|
120
120
|
|
|
@@ -17,7 +17,7 @@ from inspect import getfullargspec
|
|
|
17
17
|
import json
|
|
18
18
|
import pprint
|
|
19
19
|
import re # noqa: F401
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field,
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
|
|
21
21
|
from typing import Optional, Union
|
|
22
22
|
from typing_extensions import Annotated
|
|
23
23
|
from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict
|
|
@@ -28,11 +28,11 @@ MONTANTTTCTOTAL_ANY_OF_SCHEMAS = ["float", "str"]
|
|
|
28
28
|
|
|
29
29
|
class MontantTtcTotal(BaseModel):
|
|
30
30
|
"""
|
|
31
|
-
|
|
31
|
+
Montant total TTC.
|
|
32
32
|
"""
|
|
33
33
|
|
|
34
34
|
# data type: float
|
|
35
|
-
anyof_schema_1_validator: Optional[Union[
|
|
35
|
+
anyof_schema_1_validator: Optional[Union[Annotated[float, Field(strict=True, ge=0.0)], Annotated[int, Field(strict=True, ge=0)]]] = None
|
|
36
36
|
# data type: str
|
|
37
37
|
anyof_schema_2_validator: Optional[Annotated[str, Field(strict=True)]] = None
|
|
38
38
|
if TYPE_CHECKING:
|
|
@@ -17,22 +17,22 @@ from inspect import getfullargspec
|
|
|
17
17
|
import json
|
|
18
18
|
import pprint
|
|
19
19
|
import re # noqa: F401
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, ValidationError, field_validator
|
|
21
21
|
from typing import Optional, Union
|
|
22
22
|
from typing_extensions import Annotated
|
|
23
23
|
from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict
|
|
24
24
|
from typing_extensions import Literal, Self
|
|
25
25
|
from pydantic import Field
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
MONTANTTTCTOTAL1_ANY_OF_SCHEMAS = ["float", "str"]
|
|
28
28
|
|
|
29
|
-
class
|
|
29
|
+
class MontantTtcTotal1(BaseModel):
|
|
30
30
|
"""
|
|
31
|
-
Montant
|
|
31
|
+
Montant TTC total
|
|
32
32
|
"""
|
|
33
33
|
|
|
34
34
|
# data type: float
|
|
35
|
-
anyof_schema_1_validator: Optional[Union[
|
|
35
|
+
anyof_schema_1_validator: Optional[Union[StrictFloat, StrictInt]] = None
|
|
36
36
|
# data type: str
|
|
37
37
|
anyof_schema_2_validator: Optional[Annotated[str, Field(strict=True)]] = None
|
|
38
38
|
if TYPE_CHECKING:
|
|
@@ -58,7 +58,7 @@ class Montanttva(BaseModel):
|
|
|
58
58
|
|
|
59
59
|
@field_validator('actual_instance')
|
|
60
60
|
def actual_instance_must_validate_anyof(cls, v):
|
|
61
|
-
instance =
|
|
61
|
+
instance = MontantTtcTotal1.model_construct()
|
|
62
62
|
error_messages = []
|
|
63
63
|
# validate data type: float
|
|
64
64
|
try:
|
|
@@ -74,7 +74,7 @@ class Montanttva(BaseModel):
|
|
|
74
74
|
error_messages.append(str(e))
|
|
75
75
|
if error_messages:
|
|
76
76
|
# no match
|
|
77
|
-
raise ValueError("No match found when setting the actual_instance in
|
|
77
|
+
raise ValueError("No match found when setting the actual_instance in MontantTtcTotal1 with anyOf schemas: float, str. Details: " + ", ".join(error_messages))
|
|
78
78
|
else:
|
|
79
79
|
return v
|
|
80
80
|
|
|
@@ -108,7 +108,7 @@ class Montanttva(BaseModel):
|
|
|
108
108
|
|
|
109
109
|
if error_messages:
|
|
110
110
|
# no match
|
|
111
|
-
raise ValueError("No match found when deserializing the JSON string into
|
|
111
|
+
raise ValueError("No match found when deserializing the JSON string into MontantTtcTotal1 with anyOf schemas: float, str. Details: " + ", ".join(error_messages))
|
|
112
112
|
else:
|
|
113
113
|
return instance
|
|
114
114
|
|
factpulse/models/montant_tva.py
CHANGED
|
@@ -17,7 +17,7 @@ from inspect import getfullargspec
|
|
|
17
17
|
import json
|
|
18
18
|
import pprint
|
|
19
19
|
import re # noqa: F401
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field,
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
|
|
21
21
|
from typing import Optional, Union
|
|
22
22
|
from typing_extensions import Annotated
|
|
23
23
|
from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict
|
|
@@ -28,11 +28,11 @@ MONTANTTVA_ANY_OF_SCHEMAS = ["float", "str"]
|
|
|
28
28
|
|
|
29
29
|
class MontantTva(BaseModel):
|
|
30
30
|
"""
|
|
31
|
-
|
|
31
|
+
Montant de la TVA pour cette ligne.
|
|
32
32
|
"""
|
|
33
33
|
|
|
34
34
|
# data type: float
|
|
35
|
-
anyof_schema_1_validator: Optional[Union[
|
|
35
|
+
anyof_schema_1_validator: Optional[Union[Annotated[float, Field(strict=True, ge=0.0)], Annotated[int, Field(strict=True, ge=0)]]] = None
|
|
36
36
|
# data type: str
|
|
37
37
|
anyof_schema_2_validator: Optional[Annotated[str, Field(strict=True)]] = None
|
|
38
38
|
if TYPE_CHECKING:
|
|
@@ -26,7 +26,7 @@ from pydantic import Field
|
|
|
26
26
|
|
|
27
27
|
MONTANTTVA1_ANY_OF_SCHEMAS = ["float", "str"]
|
|
28
28
|
|
|
29
|
-
class
|
|
29
|
+
class MontantTva1(BaseModel):
|
|
30
30
|
"""
|
|
31
31
|
Montant total de la TVA.
|
|
32
32
|
"""
|
|
@@ -58,7 +58,7 @@ class Montanttva1(BaseModel):
|
|
|
58
58
|
|
|
59
59
|
@field_validator('actual_instance')
|
|
60
60
|
def actual_instance_must_validate_anyof(cls, v):
|
|
61
|
-
instance =
|
|
61
|
+
instance = MontantTva1.model_construct()
|
|
62
62
|
error_messages = []
|
|
63
63
|
# validate data type: float
|
|
64
64
|
try:
|
|
@@ -74,7 +74,7 @@ class Montanttva1(BaseModel):
|
|
|
74
74
|
error_messages.append(str(e))
|
|
75
75
|
if error_messages:
|
|
76
76
|
# no match
|
|
77
|
-
raise ValueError("No match found when setting the actual_instance in
|
|
77
|
+
raise ValueError("No match found when setting the actual_instance in MontantTva1 with anyOf schemas: float, str. Details: " + ", ".join(error_messages))
|
|
78
78
|
else:
|
|
79
79
|
return v
|
|
80
80
|
|
|
@@ -108,7 +108,7 @@ class Montanttva1(BaseModel):
|
|
|
108
108
|
|
|
109
109
|
if error_messages:
|
|
110
110
|
# no match
|
|
111
|
-
raise ValueError("No match found when deserializing the JSON string into
|
|
111
|
+
raise ValueError("No match found when deserializing the JSON string into MontantTva1 with anyOf schemas: float, str. Details: " + ", ".join(error_messages))
|
|
112
112
|
else:
|
|
113
113
|
return instance
|
|
114
114
|
|
|
@@ -26,7 +26,7 @@ from pydantic import Field
|
|
|
26
26
|
|
|
27
27
|
MONTANTUNITAIREHT_ANY_OF_SCHEMAS = ["float", "str"]
|
|
28
28
|
|
|
29
|
-
class
|
|
29
|
+
class MontantUnitaireHt(BaseModel):
|
|
30
30
|
"""
|
|
31
31
|
Montant unitaire Hors Taxes de l'article.
|
|
32
32
|
"""
|
|
@@ -58,7 +58,7 @@ class Montantunitaireht(BaseModel):
|
|
|
58
58
|
|
|
59
59
|
@field_validator('actual_instance')
|
|
60
60
|
def actual_instance_must_validate_anyof(cls, v):
|
|
61
|
-
instance =
|
|
61
|
+
instance = MontantUnitaireHt.model_construct()
|
|
62
62
|
error_messages = []
|
|
63
63
|
# validate data type: float
|
|
64
64
|
try:
|
|
@@ -74,7 +74,7 @@ class Montantunitaireht(BaseModel):
|
|
|
74
74
|
error_messages.append(str(e))
|
|
75
75
|
if error_messages:
|
|
76
76
|
# no match
|
|
77
|
-
raise ValueError("No match found when setting the actual_instance in
|
|
77
|
+
raise ValueError("No match found when setting the actual_instance in MontantUnitaireHt with anyOf schemas: float, str. Details: " + ", ".join(error_messages))
|
|
78
78
|
else:
|
|
79
79
|
return v
|
|
80
80
|
|
|
@@ -108,7 +108,7 @@ class Montantunitaireht(BaseModel):
|
|
|
108
108
|
|
|
109
109
|
if error_messages:
|
|
110
110
|
# no match
|
|
111
|
-
raise ValueError("No match found when deserializing the JSON string into
|
|
111
|
+
raise ValueError("No match found when deserializing the JSON string into MontantUnitaireHt with anyOf schemas: float, str. Details: " + ", ".join(error_messages))
|
|
112
112
|
else:
|
|
113
113
|
return instance
|
|
114
114
|
|
|
@@ -17,8 +17,9 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictBool
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from factpulse.models.profil_api import ProfilAPI
|
|
22
23
|
from typing import Optional, Set
|
|
23
24
|
from typing_extensions import Self
|
|
24
25
|
|
|
@@ -26,22 +27,12 @@ class OptionsProcessing(BaseModel):
|
|
|
26
27
|
"""
|
|
27
28
|
Options de traitement pour la génération et la soumission.
|
|
28
29
|
""" # noqa: E501
|
|
29
|
-
profil_facturx: Optional[
|
|
30
|
+
profil_facturx: Optional[ProfilAPI] = Field(default=None, description="Profil Factur-X à utiliser")
|
|
30
31
|
auto_enrichir: Optional[StrictBool] = Field(default=True, description="Auto-enrichir les données (APIs Entreprises, Chorus Pro, etc.)")
|
|
31
32
|
valider: Optional[StrictBool] = Field(default=True, description="Valider le XML Factur-X avec Schematron")
|
|
32
33
|
verifier_parametres_destination: Optional[StrictBool] = Field(default=True, description="Vérifier les paramètres requis par la destination (ex: code_service pour Chorus)")
|
|
33
34
|
__properties: ClassVar[List[str]] = ["profil_facturx", "auto_enrichir", "valider", "verifier_parametres_destination"]
|
|
34
35
|
|
|
35
|
-
@field_validator('profil_facturx')
|
|
36
|
-
def profil_facturx_validate_enum(cls, value):
|
|
37
|
-
"""Validates the enum"""
|
|
38
|
-
if value is None:
|
|
39
|
-
return value
|
|
40
|
-
|
|
41
|
-
if value not in set(['MINIMUM', 'BASIC', 'EN16931', 'EXTENDED']):
|
|
42
|
-
raise ValueError("must be one of enum values ('MINIMUM', 'BASIC', 'EN16931', 'EXTENDED')")
|
|
43
|
-
return value
|
|
44
|
-
|
|
45
36
|
model_config = ConfigDict(
|
|
46
37
|
populate_by_name=True,
|
|
47
38
|
validate_assignment=True,
|
|
@@ -93,7 +84,7 @@ class OptionsProcessing(BaseModel):
|
|
|
93
84
|
return cls.model_validate(obj)
|
|
94
85
|
|
|
95
86
|
_obj = cls.model_validate({
|
|
96
|
-
"profil_facturx": obj.get("profil_facturx")
|
|
87
|
+
"profil_facturx": obj.get("profil_facturx"),
|
|
97
88
|
"auto_enrichir": obj.get("auto_enrichir") if obj.get("auto_enrichir") is not None else True,
|
|
98
89
|
"valider": obj.get("valider") if obj.get("valider") is not None else True,
|
|
99
90
|
"verifier_parametres_destination": obj.get("verifier_parametres_destination") if obj.get("verifier_parametres_destination") is not None else True
|