o
    ‹ZiÎ  ã                   @   s`   d dl mZmZ d dlmZmZmZmZ G dd„ deƒZ	eG dd„ dƒƒZ
eG dd„ dƒƒZd	S )
é    )Ú	dataclassÚasdict)ÚOptionalÚDictÚAnyÚListc                   @   s   e Zd ZdZdS )ÚAbnLookupErrorz1Error de alto nivel para la app de ABN Lookup v1.N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__© r   r   úF/var/www/html/flask_server/apps/abn_lookup_app/abn_lookup_v1/models.pyr      s    r   c                   @   s„   e Zd ZU dZeed< dZeed< dZeed< dZeed< dZ	eed< dZ
eed< dZeed< dZeed	< d
eeef fdd„ZdS )Ú	AddressV1Ú Úline1Úline2Úline3Úline4ÚsuburbÚ
state_codeÚpostcodeÚcountry_codeÚreturnc                 C   ó   t | ƒS )N©r   ©Úselfr   r   r   Úto_dict   s   zAddressV1.to_dictN)r	   r
   r   r   ÚstrÚ__annotations__r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   
   s   
 r   c                   @   s¼   e Zd ZU eed< ee ed< eed< eed< ee ed< eed< eed< eed< eed	< eed
< eed< eed< dZ	ee ed< dZ
ee ed< dZee ed< deeef fdd„ZdS )ÚAbnRecordV1ÚabnÚacnÚ	main_nameÚ
legal_nameÚbusiness_namesÚstatus_codeÚstatus_fromÚentity_type_codeÚentity_type_descÚmain_business_addressÚpostal_addressÚgst_registeredNÚgst_effective_fromÚgst_effective_toÚlast_updated_dater   c                 C   r   )z^
        Convierte todo el registro (incluyendo direcciones) a un dict JSON-friendly.
        r   r   r   r   r   r   8   s   zAbnRecordV1.to_dict)r	   r
   r   r   r    r   r   r   Úboolr.   r/   r0   r   r   r   r   r   r   r   r!      s"   
 r!   N)Údataclassesr   r   Útypingr   r   r   r   Ú	Exceptionr   r   r!   r   r   r   r   Ú<module>   s    