
    +h5w                         d dl mZ d dlmZmZmZ 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 d dlmZmZmZmZmZmZ d d	lmZmZmZmZmZ d d
lmZ erd dlm Z   G d ded   ed   ed         Z!y)    )util)CreateableAPIResourceListableAPIResourceUpdateableAPIResource)ExpandableField)
ListObject)RequestOptions)StripeObject)class_method_variant)ClassVarDictListOptionalcastoverload)LiteralNotRequired	TypedDictUnpackTYPE_CHECKING)
quote_plus)VerificationReportc                   t   e Zd ZU dZdZeed      ed<    G d de      Z	 G d de      Z
 G d d	e      Z G d
 de      Zery G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d  d!e      Zee   ed"<   	 eed#<   	 eed$<   	 ee	   ed%<   	 eed&      ed'<   	 eed(<   	 e eef   ed)<   	 ed   ed*<   	 ee
   ed+<   	 ee   ed,<   	 ed-   ed.<   	 eed/      ed0<   	 ee   ed1<   	 ee   ed2<   	 e!	 	 	 dPd4ed5ee   d6ee   d7ee   d8e"d9   d:d fd;       Z#e$e%	 	 	 dPd4ed5ee   d6ee   d7ee   d8e"d9   d:d fd<              Z&e$	 dQd=ee   d8e"d9   d:d fd>       Z& e'd?      	 dQd=ee   d8e"d9   d:d fd@       Z&e!	 	 	 	 dRd5ee   d=ee   d6ee   d7ee   d8e"dA   d:d fdB       Z(e!	 	 	 dPd5ee   d6ee   d7ee   d8e"dC   d:e)d    f
dD       Z*e!d$ed8e"dE   d:d fdF       Z+e!	 	 	 dPd4ed5ee   d6ee   d7ee   d8e"dG   d:d fdH       Z,e$e%	 	 	 dPd4ed5ee   d6ee   d7ee   d8e"dG   d:d fdI              Z-e$	 dQd=ee   d8e"dG   d:d fdJ       Z- e'dK      	 dQd=ee   d8e"dG   d:d fdL       Z-e!d$ed8e"dM   d:d fdN       Z.e	e
eedOZ/y3)SVerificationSessiona  
    A VerificationSession guides you through the process of collecting and verifying the identities
    of your users. It contains details about the type of verification, such as what [verification
    check](https://stripe.com/docs/identity/verification-checks) to perform. Only create one VerificationSession for
    each verification in your system.

    A VerificationSession transitions through [multiple
    statuses](https://stripe.com/docs/identity/how-sessions-work) throughout its lifetime as it progresses through
    the verification flow. The VerificationSession contains the user's verified data after
    verification checks are complete.

    Related guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions)
    zidentity.verification_sessionOBJECT_NAMEc                   6    e Zd ZU eed      ed<   	 ee   ed<   y)VerificationSession.LastError)	abandonedconsent_declinedcountry_not_supporteddevice_not_supporteddocument_expireddocument_type_not_supporteddocument_unverified_other$id_number_insufficient_document_dataid_number_mismatchid_number_unverified_otherselfie_document_missing_photoselfie_face_mismatchselfie_manipulatedselfie_unverified_otherunder_supported_agecodereasonN)__name__
__module____qualname__r   r   __annotations__str     e/var/www/html/venv/lib/python3.12/site-packages/stripe/api_resources/identity/verification_session.py	LastErrorr   5   s2    '
 	
&	 	r5   r7   c                   d    e Zd ZU  G d de      Z G d de      Zee   ed<   ee   ed<   eedZy)	VerificationSession.Optionsc                   `    e Zd ZU eeed         ed<   	 ee   ed<   	 ee   ed<   	 ee   ed<   y)$VerificationSession.Options.Document)driving_licenseid_cardpassportallowed_typesrequire_id_numberrequire_live_capturerequire_matching_selfieN)r/   r0   r1   r   r   r   r2   boolr4   r5   r6   Documentr;   R   sU    #WEFG   (~- #+4.0 &.d^3r5   rD   c                       e Zd Zy)$VerificationSession.Options.IdNumberN)r/   r0   r1   r4   r5   r6   IdNumberrF   f   s    r5   rG   document	id_numberrH   rI   N)	r/   r0   r1   r
   rD   rG   r   r2   _inner_class_typesr4   r5   r6   Optionsr9   Q   s=    	| 	(	| 	 8$$H%%*2Jr5   rL   c                       e Zd ZU ed   ed<   y)VerificationSession.Redaction)
processingredactedstatusN)r/   r0   r1   r   r2   r4   r5   r6   	RedactionrN   m   s    011	r5   rR   c                       e Zd ZU  G d de      Z G d de      Zee   ed<   	 ee   ed<   	 ee   ed<   	 ee   ed<   	 ee	d	      ed
<   	 ee   ed<   	 eedZ
y)#VerificationSession.VerifiedOutputsc                   x    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<   y)+VerificationSession.VerifiedOutputs.Addresscitycountryline1line2postal_codestateN)r/   r0   r1   r   r3   r2   r4   r5   r6   AddressrV   t   sf    3- c]" C=  C=  "#& C= r5   r]   c                   B    e Zd ZU ee   ed<   	 ee   ed<   	 ee   ed<   y)'VerificationSession.VerifiedOutputs.DobdaymonthyearN)r/   r0   r1   r   intr2   r4   r5   r6   Dobr_      s3    # C=  3-r5   rd   addressdob
first_namerI   )br_cpfsg_nricus_ssnid_number_type	last_name)re   rf   N)r/   r0   r1   r
   r]   rd   r   r2   r3   r   rK   r4   r5   r6   VerifiedOutputsrT   s   s    	l 	4	, 	 '""	 c]	 SM!	 C= 	 !)F!GHH	 C= 	 *1=r5   rm   c                       e Zd ZU ed   ed<   y) VerificationSession.CancelParams	List[str]expandNr/   r0   r1   r   r2   r4   r5   r6   CancelParamsro          ,,r5   rs   c                   f    e Zd ZU ed   ed<   	 ed   ed<   	 ed   ed<   	 ed   ed<   	 ed	   ed
<   y) VerificationSession.CreateParamsrp   rq   Dict[str, str]metadata'VerificationSession.CreateParamsOptionsoptionsr3   
return_urlrJ   typeN)r/   r0   r1   r   r2   r   r4   r5   r6   CreateParamsrv      s]    ,, ""233 !!JKK $E** 122r5   r}   c                       e Zd ZU ed   ed<   y)ry   z;Literal['']|VerificationSession.CreateParamsOptionsDocumentrH   Nrr   r4   r5   r6   CreateParamsOptionsz'VerificationSession.CreateParamsOptions       !M r5   r   c                   T    e Zd ZU ed   ed<   	 ed   ed<   	 ed   ed<   	 ed   ed<   y)/VerificationSession.CreateParamsOptionsDocument7List[Literal['driving_license', 'id_card', 'passport']]r?   rC   r@   rA   rB   Nrr   r4   r5   r6   CreateParamsOptionsDocumentr      M    &I   +622 #.f"55 &1%88r5   r   c                   v    e Zd ZU ed   ed<   ed   ed<   	 ed   ed<   	 ed   ed<   	 ed   ed	<   	 ed
   ed<   y)VerificationSession.ListParamsz)VerificationSession.ListParamsCreated|intcreatedr3   ending_beforerp   rq   rc   limitstarting_afterz?Literal['canceled', 'processing', 'requires_input', 'verified']rQ   Nrr   r4   r5   r6   
ListParamsr      sk     !LMM&u--  ,, u%% (..  Q r5   r   c                   T    e Zd ZU ed   ed<   	 ed   ed<   	 ed   ed<   	 ed   ed<   y)%VerificationSession.ListParamsCreatedrc   gtgteltlteNrr   r4   r5   r6   ListParamsCreatedr   	  sH    E"" U## E"" U##r5   r   c                   T    e Zd ZU ed   ed<   	 ed   ed<   	 ed   ed<   	 ed   ed<   y	)
 VerificationSession.ModifyParamsrp   rq   rw   rx   'VerificationSession.ModifyParamsOptionsrz   z Literal['document', 'id_number']r|   Nrr   r4   r5   r6   ModifyParamsr     sK    ,, ""233 !!JKK @AAr5   r   c                       e Zd ZU ed   ed<   y)r   z;Literal['']|VerificationSession.ModifyParamsOptionsDocumentrH   Nrr   r4   r5   r6   ModifyParamsOptionsz'VerificationSession.ModifyParamsOptions-  r   r5   r   c                   T    e Zd ZU ed   ed<   	 ed   ed<   	 ed   ed<   	 ed   ed<   y)/VerificationSession.ModifyParamsOptionsDocumentr   r?   rC   r@   rA   rB   Nrr   r4   r5   r6   ModifyParamsOptionsDocumentr   5  r   r5   r   c                       e Zd ZU ed   ed<   y) VerificationSession.RedactParamsrp   rq   Nrr   r4   r5   r6   RedactParamsr   I  rt   r5   r   c                       e Zd ZU ed   ed<   y)"VerificationSession.RetrieveParamsrp   rq   Nrr   r4   r5   r6   RetrieveParamsr   O  rt   r5   r   client_secretr   id
last_errorr   last_verification_reportlivemoderx   objectrz   	redaction)canceledrO   requires_inputverifiedrQ   rJ   r|   urlverified_outputsNsessionapi_keystripe_versionstripe_accountparamsro   returnc                     t        d| j                  ddj                  t        j                  |            ||||            S )>  
        A VerificationSession object can be canceled when it is in requires_input [status](https://stripe.com/docs/identity/how-sessions-work).

        Once canceled, future submission attempts are disabled. This cannot be undone. [Learn more](https://stripe.com/docs/identity/verification-sessions#cancel).
        r   post3/v1/identity/verification_sessions/{session}/cancelr   r   r   r   r   r   _static_requestformatr   sanitize_idclsr   r   r   r   r   s         r6   _cls_cancelzVerificationSession._cls_cancel  sZ     !ELL ,,W5 M   --   	
 	
r5   c                      yr   Nr4   r   r   r   r   r   s        r6   cancelzVerificationSession.cancel  s     	r5   idempotency_keyc                      yr   r4   selfr   r   s      r6   r   zVerificationSession.cancel  s     	r5   r   c                     t        d| j                  ddj                  t        j                  | j                  d                  ||            S )r   r   r   r   r   r   r   r   r   _requestr   r   r   getr   s      r6   r   zVerificationSession.cancel  sZ     !MMELL ,,TXXd^< M  !0  

 
	
r5   rv   c                 `    t        d| j                  d| j                         |||||            S )a  
        Creates a VerificationSession object.

        After the VerificationSession is created, display a verification modal using the session client_secret or send your users to the session's url.

        If your API key is in test mode, verification checks won't actually process, though everything else will occur as if in live mode.

        Related guide: [Verify your users' identity documents](https://stripe.com/docs/identity/verify-identity-documents)
        r   r   )r   r   	class_url)r   r   r   r   r   r   s         r6   createzVerificationSession.create  s=    $ !
 	
r5   r   c                     | j                  d| j                         ||||      }t        |t              s!t	        dt        |      j                  z        |S )z8
        Returns a list of VerificationSessions
        r   r   z%Expected list object from API, got %s)r   r   
isinstancer   	TypeErrorr|   r/   )r   r   r   r   r   results         r6   listzVerificationSession.list  sf     $$MMO)) % 
 &*-7<((* 
 r5   r   c                 z    | j                         dt        |      }t        d| j                  d||            S )z
        Updates a VerificationSession object.

        When the session status is requires_input, you can use this method to update the
        verification check and options.
        /r   r   )r   )r   r   r   r   )r   r   r   r   s       r6   modifyzVerificationSession.modify  s=     *R.9!F;
 	
r5   r   c                     t        d| j                  ddj                  t        j                  |            ||||            S )  
        Redact a VerificationSession to remove all collected information from Stripe. This will redact
        the VerificationSession and all objects related to it, including VerificationReports, Events,
        request logs, etc.

        A VerificationSession object can be redacted when it is in requires_input or verified
        [status](https://stripe.com/docs/identity/how-sessions-work). Redacting a VerificationSession in requires_action
        state will automatically cancel it.

        The redaction process may take up to four days. When the redaction process is in progress, the
        VerificationSession's redaction.status field will be set to processing; when the process is
        finished, it will change to redacted and an identity.verification_session.redacted event
        will be emitted.

        Redaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the
        fields that contain personal data will be replaced by the string [redacted] or a similar
        placeholder. The metadata field will also be erased. Redacted objects cannot be updated or
        used for any purpose.

        [Learn more](https://stripe.com/docs/identity/verification-sessions#redact).
        r   r   3/v1/identity/verification_sessions/{session}/redactr   r   r   r   s         r6   _cls_redactzVerificationSession._cls_redact)  sZ    < !ELL ,,W5 M   --   	
 	
r5   c                      yr   Nr4   r   s        r6   redactzVerificationSession.redactU  s    < 	r5   c                      yr   r4   r   s      r6   r   zVerificationSession.redactu  s    6 	r5   r   c                     t        d| j                  ddj                  t        j                  | j                  d                  ||            S )r   r   r   r   r   r   r   r   r   s      r6   r   zVerificationSession.redact  sZ    6 !MMELL ,,TXXd^< M  !0  

 
	
r5   r   c                 8     | |fi |}|j                          |S )z
        Retrieves the details of a VerificationSession that was previously created.

        When the session status is requires_input, you can use this method to retrieve a valid
        client_secret or url to allow re-submission.
        )refresh)r   r   r   instances       r6   retrievezVerificationSession.retrieve  s$     r$V$r5   )r   rz   r   r   )NNN)N)NNNN)0r/   r0   r1   __doc__r   r   r   r2   r
   r7   rL   rR   rm   r   r	   rs   r}   r   r   r   r   r   r   r   r   r   r   r   r3   rc   r   rC   r   classmethodr   r   r   staticmethodr   r   r   r   r   r   r   r   r   rK   r4   r5   r6   r   r      s   
  	( /0 (L 8K, K8L A>, A>F 	> 		> 	,	) 		) 	(	 	2		 	$	> 	$	) 		) 	(	> 		^ 	 C=  L 	G ## '7K'LMM N 38n 344 g 	"" JKK 723
44 
# //  "&(,(,

 #
 !	

 !
 ;<
 

 
6  "&(,(,	# ! !	
 ;< 
    *.
!#
 ;<
 
	
 
 -( *.
!#
 ;<
 
	
 )
,  "&)-(,(,
#
 "#
 !	

 !
 ;<
 

 
<  "&(,(,	# ! !	
 9: 
)	* 6 

 &'I J
	
 
  "&(,(,)
)
 #)
 !	)

 !)
 ;<)
 
)
 )
V  "&(,(,	# ! !	
 ;< 
  <  *.!# ;< 
	 8 -( *.$
!#$
 ;<$
 
	$
 )$
L  &'K L	   +	r5   r   N)"striper   stripe.api_resources.abstractr   r   r   %stripe.api_resources.expandable_fieldr    stripe.api_resources.list_objectr   stripe.request_optionsr	   stripe.stripe_objectr
   stripe.utilr   typingr   r   r   r   r   r   typing_extensionsr   r   r   r   r   urllib.parser   1stripe.api_resources.identity.verification_reportr   r   r4   r5   r6   <module>r      sj     
 B 7 1 - , A A  $
n
/0-./0n
r5   