a
    ù!f¾u  ã                   @   sŒ   d dl mZ d dlmZ d dlmZ d dlmZ d dl	m
Z
mZmZmZ d dlmZmZ d dlmZ ertd dlmZ G d	d
„ d
ed
 ƒZdS )é    )ÚUpdateableAPIResource)ÚAccount)ÚExpandableField)ÚStripeObject)ÚClassVarÚDictÚListÚOptional)ÚLiteralÚTYPE_CHECKING)Ú
quote_plus)ÚFilec                   @   sŽ  e Zd ZU dZdZeed  ed< G dd„ deƒZ	G dd„ deƒZ
G dd	„ d	eƒZG d
d„ deƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZee ed< ee	 ed< ee
 ed< ee ed< ee ed< eed< ee ed< ee ed< ee ed < ee ed!< ee ed"< eee  ed#< ee ed$< ee ed%< eed&< ee ed'< ee ed(< ee ed)< ee ed*< ee ed+< ee ed,< eeeef  ed-< ee ed.< ed ed/< ee ed0< eed1  ed2< ee ed3< ee ed4< ee ed5< ee ed6< ee ed7< eed8  ed9< d:d;„ Zed<d=„ ƒZedBd?d@„ƒZe	e
eeeeeeeedAœ
Zd>S )CÚPersona}  
    This is an object representing a person associated with a Stripe account.

    A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account.
    See the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform prefilling and account onboarding steps.

    Related guide: [Handling identity verification with the API](https://stripe.com/docs/connect/handling-api-verification#person-information)
    ZpersonÚOBJECT_NAMEc                   @   s.   e Zd ZU G dd„ deƒZeed< deiZdS )zPerson.AdditionalTosAcceptancesc                   @   s2   e Zd ZU ee ed< ee ed< ee ed< dS )z'Person.AdditionalTosAcceptances.AccountÚdateÚipÚ
user_agentN)Ú__name__Ú
__module__Ú__qualname__r	   ÚintÚ__annotations__Ústr© r   r   ú\/var/www/html/python-backend/venv/lib/python3.9/site-packages/stripe/api_resources/person.pyr      s   
r   ÚaccountN)r   r   r   r   r   r   Ú_inner_class_typesr   r   r   r   ÚAdditionalTosAcceptances   s   
r   c                   @   sV   e Zd ZU ee ed< ee ed< ee ed< ee ed< ee ed< ee ed< dS )zPerson.AddressÚcityÚcountryÚline1Úline2Úpostal_codeÚstateN©r   r   r   r	   r   r   r   r   r   r   ÚAddress-   s   
r%   c                   @   sb   e Zd ZU ee ed< ee ed< ee ed< ee ed< ee ed< ee ed< ee ed< dS )	zPerson.AddressKanar   r   r    r!   r"   r#   ÚtownNr$   r   r   r   r   ÚAddressKanaG   s   
r'   c                   @   sb   e Zd ZU ee ed< ee ed< ee ed< ee ed< ee ed< ee ed< ee ed< dS )	zPerson.AddressKanjir   r   r    r!   r"   r#   r&   Nr$   r   r   r   r   ÚAddressKanjie   s   
r(   c                   @   s2   e Zd ZU ee ed< ee ed< ee ed< dS )z
Person.DobÚdayÚmonthÚyearN)r   r   r   r	   r   r   r   r   r   r   ÚDobƒ   s   
r,   c                   @   s„   e Zd ZU G dd„ deƒZG dd„ deƒZeee  ed< ee	 ed< ee ed< ee	 ed< ee	 ed	< ee	 ed
< eedœZ
dS )zPerson.FutureRequirementsc                   @   s&   e Zd ZU ee ed< ee ed< dS )z%Person.FutureRequirements.AlternativeÚalternative_fields_dueÚoriginal_fields_dueN©r   r   r   r   r   r   r   r   r   r   ÚAlternative’   s   
r0   c                   @   s*   e Zd ZU ed ed< eed< eed< dS )zPerson.FutureRequirements.Error©WZ&invalid_address_city_state_postal_codeZ$invalid_address_highway_contract_boxZinvalid_address_private_mailboxZinvalid_business_profile_nameZ(invalid_business_profile_name_denylistedZinvalid_company_name_denylistedZinvalid_dob_age_over_maximumZinvalid_dob_age_under_18Zinvalid_dob_age_under_minimumZ"invalid_product_description_lengthZ%invalid_product_description_url_matchZinvalid_representative_countryZ.invalid_statement_descriptor_business_mismatchZ'invalid_statement_descriptor_denylistedZ#invalid_statement_descriptor_lengthZ.invalid_statement_descriptor_prefix_denylistedZ,invalid_statement_descriptor_prefix_mismatchZinvalid_street_addressZinvalid_tax_idZinvalid_tax_id_formatZinvalid_tos_acceptanceZinvalid_url_denylistedZinvalid_url_formatZinvalid_url_lengthZ!invalid_url_web_presence_detectedZ1invalid_url_website_business_information_mismatchZinvalid_url_website_emptyZ invalid_url_website_inaccessibleZ+invalid_url_website_inaccessible_geoblockedZ3invalid_url_website_inaccessible_password_protectedZinvalid_url_website_incompleteZ2invalid_url_website_incomplete_cancellation_policyZ7invalid_url_website_incomplete_customer_service_detailsZ1invalid_url_website_incomplete_legal_restrictionsZ,invalid_url_website_incomplete_refund_policyZ,invalid_url_website_incomplete_return_policyZ3invalid_url_website_incomplete_terms_and_conditionsZ1invalid_url_website_incomplete_under_constructionZinvalid_url_website_otherZinvalid_value_otherZverification_directors_mismatchZ&verification_document_address_mismatchZ%verification_document_address_missingZverification_document_corruptZ+verification_document_country_not_supportedZ(verification_document_directors_mismatchZ"verification_document_dob_mismatchZ$verification_document_duplicate_typeZverification_document_expiredZ!verification_document_failed_copyZ&verification_document_failed_greyscaleZ"verification_document_failed_otherZ&verification_document_failed_test_modeZ verification_document_fraudulentZ(verification_document_id_number_mismatchZ'verification_document_id_number_missingZ verification_document_incompleteZverification_document_invalidZ2verification_document_issue_or_expiry_date_missingZ!verification_document_manipulatedZ"verification_document_missing_backZ#verification_document_missing_frontZ#verification_document_name_mismatchZ"verification_document_name_missingZ*verification_document_nationality_mismatchZ"verification_document_not_readableZ verification_document_not_signedZ"verification_document_not_uploadedZ$verification_document_photo_mismatchZverification_document_too_largeZ(verification_document_type_not_supportedZ!verification_extraneous_directorsZ!verification_failed_address_matchZ'verification_failed_business_iec_numberZ"verification_failed_document_matchZ#verification_failed_id_number_matchZ"verification_failed_keyed_identityZverification_failed_keyed_matchZverification_failed_name_matchZverification_failed_otherZ'verification_failed_residential_addressZ verification_failed_tax_id_matchZ%verification_failed_tax_id_not_issuedZverification_missing_directorsZverification_missing_executivesZverification_missing_ownersZ;verification_requires_additional_memorandum_of_associationsÚcodeÚreasonÚrequirementN©r   r   r   r
   r   r   r   r   r   r   ÚErrorœ   s   
ÿ\r6   ÚalternativesÚcurrently_dueÚerrorsÚeventually_dueÚpast_dueÚpending_verification©r7   r9   N©r   r   r   r   r0   r6   r	   r   r   r   r   r   r   r   r   ÚFutureRequirements‘   s   

fr?   c                   @   sV   e Zd ZU ee ed< ee ed< ee ed< ee ed< ee ed< ee ed< dS )zPerson.RegisteredAddressr   r   r    r!   r"   r#   Nr$   r   r   r   r   ÚRegisteredAddress  s   
r@   c                   @   sb   e Zd ZU ee ed< ee ed< ee ed< ee ed< ee ed< ee ed< ee ed< dS )	zPerson.RelationshipZdirectorZ	executiveZlegal_guardianÚownerZpercent_ownershipZrepresentativeÚtitleN)r   r   r   r	   Úboolr   Úfloatr   r   r   r   r   ÚRelationship6  s   
rE   c                   @   s„   e Zd ZU G dd„ deƒZG dd„ deƒZeee  ed< ee	 ed< ee ed< ee	 ed< ee	 ed	< ee	 ed
< eedœZ
dS )zPerson.Requirementsc                   @   s&   e Zd ZU ee ed< ee ed< dS )zPerson.Requirements.Alternativer-   r.   Nr/   r   r   r   r   r0   U  s   
r0   c                   @   s*   e Zd ZU ed ed< eed< eed< dS )zPerson.Requirements.Errorr1   r2   r3   r4   Nr5   r   r   r   r   r6   _  s   
ÿ\r6   r7   r8   r9   r:   r;   r<   r=   Nr>   r   r   r   r   ÚRequirementsT  s   

frF   c                   @   sp   e Zd ZU G dd„ deƒZG dd„ deƒZee ed< ee ed< ee ed< ee ed< eed	< eed
œZ	dS )zPerson.Verificationc                   @   sF   e Zd ZU eed  ed< ee ed< ee ed< eed  ed< dS )z&Person.Verification.AdditionalDocumentr   ÚbackÚdetailsÚdetails_codeÚfrontN©r   r   r   r	   r   r   r   r   r   r   r   ÚAdditionalDocumentà  s
   
rL   c                   @   sF   e Zd ZU eed  ed< ee ed< ee ed< eed  ed< dS )zPerson.Verification.Documentr   rG   rH   rI   rJ   NrK   r   r   r   r   ÚDocumentò  s
   
rM   Úadditional_documentrH   rI   ÚdocumentÚstatus)rN   rO   N)
r   r   r   r   rL   rM   r	   r   r   r   r   r   r   r   ÚVerificationß  s   
þrQ   r   Úadditional_tos_acceptancesÚaddressÚaddress_kanaÚaddress_kanjiÚcreatedÚdobÚemailZ
first_nameZfirst_name_kanaZfirst_name_kanjiZfull_name_aliasesÚfuture_requirementsZgenderÚidZid_number_providedZid_number_secondary_providedÚ	last_nameZlast_name_kanaZlast_name_kanjiZmaiden_nameÚmetadataZnationalityÚobjectÚphone)ÚexistingÚnoneZpolitical_exposureÚregistered_addressÚrelationshipÚrequirementsZssn_last_4_providedÚverificationTZdeletedc                 C   s>   | j }| j}t ¡ }|d us J ‚t|ƒ}t|ƒ}d|||f S )Nz%s/%s/persons/%s)rZ   r   ÚAccountResourceZ	class_urlr   )ÚselfÚtokenr   ÚbaseZ	acct_extnZextnr   r   r   Úinstance_url‰  s    zPerson.instance_urlc                 K   s   t dƒ‚d S )NzŸCan't modify a person without an account ID. Use stripe.Account.modify_person('account_id', 'person_id', ...) (see https://stripe.com/docs/api/persons/update).©ÚNotImplementedError)ÚclsZsidÚparamsr   r   r   Úmodify’  s    ÿzPerson.modifyNc                 K   s   t dƒ‚d S )Nz Can't retrieve a person without an account ID. Use stripe.Account.retrieve_person('account_id', 'person_id') (see https://stripe.com/docs/api/persons/retrieve).rj   )rl   rZ   Zapi_keyrm   r   r   r   Úretrieveš  s    ÿzPerson.retrieve)
rR   rS   rT   rU   rW   rY   ra   rb   rc   rd   )N)r   r   r   Ú__doc__r   r   r
   r   r   r   r%   r'   r(   r,   r?   r@   rE   rF   rQ   r	   r   r   r   rC   r   ri   Úclassmethodrn   ro   r   r   r   r   r   r      s|   
	  ;	
ör   N)Zstripe.api_resources.abstractr   Zstripe.api_resources.accountr   re   Z%stripe.api_resources.expandable_fieldr   Zstripe.stripe_objectr   Útypingr   r   r   r	   Ztyping_extensionsr
   r   Úurllib.parser   Zstripe.api_resources.filer   r   r   r   r   r   Ú<module>   s   