
    jof-                         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 erd dlmZ  G d d	ed	         ed	                   ZeZd
S )    )CreateableAPIResource)
ListObject)ListableAPIResource)RequestOptions)AnyClassVarDictListOptionalcast)LiteralNotRequired	TypedDictUnpackTYPE_CHECKING)FileLinkc                      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 G d de          Zeed<   	 ee         ed<   	 ee         ed<   	 eed<   	 eed                  ed<   	 ed         ed<   	 ed         ed<   	 eed<   	 ee         ed<   	 ee         ed<   	 ee         ed<   	 eded         dd fd            Zeded         dd fd            Zeded          ded          fd!            Zeded          ded          fd"            Zededed#         dd fd$            Zededed#         dd fd%            Zd&Zed'             Zd(S ))Filea  
    This object represents files hosted on Stripe's servers. You can upload
    files with the [create file](https://stripe.com/docs/api#create_file) request
    (for example, when uploading dispute evidence). Stripe also
    creates files independently (for example, the results of a [Sigma scheduled
    query](https://stripe.com/docs/api#scheduled_queries)).

    Related guide: [File upload guide](https://stripe.com/docs/file-upload)
    fileOBJECT_NAMEc                   n    e Zd ZU eee                  ed<   	 eed<   	 ed         ed<   	 ed         ed<   dS )File.CreateParamsexpandr   File.CreateParamsFileLinkDatafile_link_data)
account_requirementadditional_verificationbusiness_iconbusiness_logocustomer_signaturedispute_evidenceidentity_documentpci_documenttax_document_user_uploadterminal_reader_splashscreenpurposeN)	__name__
__module____qualname__r   r
   str__annotations__r   r        F/var/www/html/Alfredo/env/lib/python3.11/site-packages/stripe/_file.pyCreateParamsr   !   sw         DI&&&&	 				 $$CDDDD	 	,
 	
 	
 	
	 	r-   r/   c                   J    e Zd ZU eed<   	 ee         ed<   	 ed         ed<   dS )r   create
expires_atzLiteral['']|Dict[str, str]metadataN)r'   r(   r)   boolr+   r   intr,   r-   r.   CreateParamsFileLinkDatazFile.CreateParamsFileLinkData>   sP         	  $$$$	 :;;;;	 	r-   r6   c                       e Zd ZU ed         ed<   	 ee         ed<   	 eee                  ed<   	 ee         ed<   	 eed                  ed<   	 ee         ed<   d	S )
File.ListParamszFile.ListParamsCreated|intcreatedending_beforer   limitr   r   r   r   r    r!   #document_provider_identity_documentfinance_report_runr"   identity_document_downloadabler#   selfiesigma_scheduled_queryr$   r%   r&   starting_afterN)	r'   r(   r)   r   r+   r*   r
   r5   r   r,   r-   r.   
ListParamsr8   L   s         9::::	 #3''''	 DI&&&&	 3	 0
 	
 	
 	
&	 $C((((	 	r-   rC   c                   n    e Zd ZU ee         ed<   	 ee         ed<   	 ee         ed<   	 ee         ed<   dS )File.ListParamsCreatedgtgteltlteN)r'   r(   r)   r   r5   r+   r,   r-   r.   ListParamsCreatedrE   x   so         	 	 	 	 	r-   rJ   c                   2    e Zd ZU eee                  ed<   dS )File.RetrieveParamsr   N)r'   r(   r)   r   r
   r*   r+   r,   r-   r.   RetrieveParamsrL      s+         DI&&&&	 	r-   rM   r9   r2   filenameidr   linksobjectr<   r&   sizetitletypeurlparamsr   returnc           
      v    t          d|                     d|                                 |dd                    S )%  
        To upload a file to Stripe, you need to send a request of type multipart/form-data. Include the file you want to upload in the request, and the parameters for creating a file.

        All of Stripe's officially supported Client libraries support sending multipart/form-data.
        r   postfilesV1FILESrV   base_addressapi_mode)r   _static_request	class_urlclsrV   s     r.   r1   zFile.create   sH     $"    	
 	
 		
r-   c           
         K   t          d|                     d|                                 |dd           d{V           S )rY   r   rZ   r[   r\   r]   N)r   _static_request_asyncra   rb   s     r.   create_asynczFile.create_async   sj       ++$" ,        	
 	
 		
r-   r8   c                     |                      d|                                 |          }t          |t                    s$t	          dt          |          j        z            |S )
        Returns a list of the files that your account has access to. Stripe sorts and returns the files by their creation dates, placing the most recently created files at the top.
        getrV   %Expected list object from API, got %s)r`   ra   
isinstancer   	TypeErrorrT   r'   rc   rV   results      r.   listz	File.list   sp    
 $$MMOO % 
 

 &*-- 	7<<(*  
 r-   c                    K   |                      d|                                 |           d{V }t          |t                    s$t	          dt          |          j        z            |S )rh   ri   rj   Nrk   )re   ra   rl   r   rm   rT   r'   rn   s      r.   
list_asynczFile.list_async  s       00MMOO 1 
 
 
 
 
 
 
 

 &*-- 	7<<(*  
 r-   rL   c                 @     | |fi |}|                                  |S )
        Retrieves the details of an existing file object. After you supply a unique file ID, Stripe returns the corresponding file object. Learn how to [access file contents](https://stripe.com/docs/file-upload#download-file-contents).
        )refreshrc   rO   rV   instances       r.   retrievezFile.retrieve  s2     3r$$V$$r-   c                 P   K    | |fi |}|                                  d{V  |S )rt   N)refresh_asyncrv   s       r.   retrieve_asynczFile.retrieve_async$  sH       3r$$V$$$$&&&&&&&&&r-   file_uploadc                     dS )Nz	/v1/filesr,   )rc   s    r.   ra   zFile.class_url5  s    {r-   N)r'   r(   r)   __doc__r   r   r   r+   r   r/   r   r6   rC   rJ   rM   r5   r   r*   r   classmethodr   r1   rf   rp   rr   rx   r{   OBJECT_NAME_ALTra   r,   r-   r.   r   r      s          .4K'&/*333    ~   :    9   * * * * *^ * * *X    I   $        LLL  sm 	GGG Jz*++++ FO 	(   " III C= 3- 
# 
f%89 
f 
 
 
 [
" 
12
	
 
 
 [
& F#45 *V:L    [" /0	F	   [&  &'< =	   [  &'< =	   [ $O  [  r-   r   N)stripe._createable_api_resourcer   stripe._list_objectr   stripe._listable_api_resourcer   stripe._request_optionsr   typingr   r   r	   r
   r   r   typing_extensionsr   r   r   r   r   stripe._file_linkr   r   
FileUploadr,   r-   r.   <module>r      s.   B A A A A A * * * * * * = = = = = = 2 2 2 2 2 2 < < < < < < < < < < < < < < < <               +******c c c c c (*=f*E c c cN	 


r-   