-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
670d610
commit e691ab6
Showing
2 changed files
with
130 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import datetime as dt | ||
from typing import List, Optional | ||
|
||
from cuenca_validations.types import Address, CurpField, PhoneNumber, Rfc | ||
from pydantic import BaseModel, EmailStr | ||
|
||
|
||
class BusinessDetails(BaseModel): | ||
business_description: str | ||
account_usage_description: str | ||
|
||
|
||
class TransactionalProfile(BaseModel): | ||
currency: str | ||
monthly_amount: str | ||
recipients_num: int | ||
payers_num: int | ||
internal_transfers_amount: int | ||
internal_transfers_num: int | ||
spei_transfers_amount: int | ||
spei_transfers_num: int | ||
|
||
|
||
class LicenseDetails(BaseModel): | ||
license_required: bool | ||
supervisory_entity: Optional[str] = None | ||
license_type: Optional[str] = None | ||
license_date: Optional[dt.date] = None | ||
|
||
|
||
class AuditDetails(BaseModel): | ||
has_audit: bool | ||
audit_provider: Optional[str] = None | ||
audit_date: Optional[dt.date] = None | ||
audit_comments: Optional[str] = None | ||
|
||
|
||
class VulnerableActivityDetails(BaseModel): | ||
is_vulnerable_activity: bool | ||
has_sat_register: bool = None | ||
sat_registered_date: Optional[dt.date] = None | ||
is_in_compliance: Optional[bool] = None | ||
|
||
|
||
class PhysicalPerson(BaseModel): | ||
# Usar curp_validation? | ||
names: str | ||
first_surname: str | ||
second_surname: Optional[str] = None | ||
curp: CurpField | ||
rfc: Rfc | ||
|
||
|
||
class LegalRepresentative(PhysicalPerson): | ||
job: str | ||
phone_number: Optional[PhoneNumber] | ||
email_address: Optional[EmailStr] | ||
address: Optional[Address] | ||
|
||
|
||
class ShareholderPhysical(PhysicalPerson): | ||
percentage: str | ||
|
||
|
||
class ShareholderMoral(BaseModel): | ||
name: str | ||
percentage: str | ||
shareholders: List[ShareholderPhysical] | ||
legal_representatives: List[LegalRepresentative] | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import datetime as dt | ||
from typing import ClassVar, List, Optional | ||
|
||
from clabe import Clabe | ||
from cuenca_validations.types import Address, PhoneNumber, QueryParams | ||
from cuenca_validations.types.enums import Country | ||
from cuenca_validations.types.identities import Rfc | ||
from pydantic import EmailStr | ||
|
||
from ..cuenca_validations import ( | ||
AuditDetails, | ||
BusinessDetails, | ||
LegalRepresentative, | ||
LicenseDetails, | ||
ShareholderMoral, | ||
TransactionalProfile, | ||
VulnerableActivityDetails, | ||
) | ||
from .base import Creatable, Queryable, Retrievable, Updateable | ||
|
||
|
||
class PartnerUser(Creatable, Retrievable, Updateable, Queryable): | ||
_resource: ClassVar = 'partner_users' | ||
_query_params: ClassVar = QueryParams | ||
|
||
created_at: dt.datetime | ||
updated_at: dt.datetime | ||
|
||
# 01 - General | ||
legal_name: str | ||
business_name: str | ||
nationality: Country | ||
incorporation_date: dt.date | ||
folio: str | ||
certificate_number: str | ||
rfc: Rfc | ||
documentation_url: str | ||
# 02 - Contacto | ||
web_site: str | ||
phone_number: PhoneNumber | ||
email_address: EmailStr | ||
address: Address | ||
# 03 - Detalles | ||
business_details: Optional[BusinessDetails] = None | ||
# 04 - Perfil transaccional | ||
transactional_profile: Optional[TransactionalProfile] = None | ||
# 05 Cuenta externa | ||
external_account: Optional[Clabe] = None | ||
|
||
# Estado regulatorio | ||
# 01 Licencia | ||
license: Optional[LicenseDetails] = None | ||
# 02 Auditoria | ||
audit: Optional[AuditDetails] = None | ||
# 03 Manuales y politicas: Son archivos, no pide info | ||
# 04 Actividades vulnearables | ||
vulnerable_activity: Optional[VulnerableActivityDetails] = None | ||
|
||
# Representantes y accionista | ||
legal_representatives: List[LegalRepresentative] = [] | ||
shareholders: List[ShareholderMoral] = [] | ||