77import datetime as dt
88from typing import ClassVar , Optional , cast
99
10+ from cuenca_validations .types import SATRegimeCode
1011from pydantic import BaseModel
1112from pydantic .dataclasses import dataclass
1213
@@ -22,6 +23,7 @@ class CustomerRequest(BaseModel):
2223 Attributes:
2324 legal_name (str): Full name of the customer.
2425 tax_id (str): RFC of the customer.
26+ tax_system: SATRegimeCode regime code from SAT
2527 email (str): Email of the customer.
2628 phone (str): Phone of the customer. Optional.
2729 address (CustomerAddress): Address object of the customer. Optional.
@@ -30,9 +32,10 @@ class CustomerRequest(BaseModel):
3032
3133 legal_name : str
3234 tax_id : str
35+ tax_system : SATRegimeCode
3336 email : str
3437 phone : Optional [str ]
35- address : Optional [ CustomerAddress ]
38+ address : CustomerAddress
3639
3740
3841class CustomerUpdateRequest (BaseModel ):
@@ -43,6 +46,7 @@ class CustomerUpdateRequest(BaseModel):
4346 Attributes:
4447 legal_name (str): Full name of the customer. Optional.
4548 tax_id (str): RFC of the customer. Optional.
49+ tax_system: SATRegimeCode regime code from SAT
4650 email (str): Email of the customer. Optional.
4751 phone (str): Phone of the customer. Optional.
4852 address (CustomerAddress): Address object of the customer. Optional.
@@ -51,6 +55,7 @@ class CustomerUpdateRequest(BaseModel):
5155
5256 legal_name : Optional [str ]
5357 tax_id : Optional [str ]
58+ tax_system : Optional [SATRegimeCode ]
5459 email : Optional [str ]
5560 phone : Optional [str ]
5661 address : Optional [CustomerAddress ]
@@ -72,8 +77,8 @@ class Customer(Creatable, Queryable, Retrievable, Updatable):
7277 tax_id (str): RFC of the customer.
7378 email (str): Email of the customer.
7479 address (CustomerAddress): Address data of the model. Optional.
80+ tax_system (SATRegimeCode): Enum from catalogue of SAT
7581 phone (str): Phone of the customer. Defaults to `None`.
76-
7782 """
7883
7984 _resource : ClassVar = 'customers'
@@ -83,7 +88,8 @@ class Customer(Creatable, Queryable, Retrievable, Updatable):
8388 legal_name : str
8489 tax_id : str
8590 email : str
86- address : Optional [CustomerAddress ]
91+ address : CustomerAddress
92+ tax_system : Optional [SATRegimeCode ] = None
8793 phone : Optional [str ] = None
8894
8995 @classmethod
0 commit comments