
    <@g5.                         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y
)    )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y())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                   T    e Zd ZU eee      ed<   	 eed<   	 ed   ed<   	 ed   ed<   y)File.CreateParamsexpandr   File.CreateParamsFileLinkDatafile_link_data)account_requirementadditional_verificationbusiness_iconbusiness_logocustomer_signaturedispute_evidenceidentity_documentissuing_regulatory_reportingpci_documenttax_document_user_uploadterminal_reader_splashscreenpurposeN)	__name__
__module____qualname__r   r
   str__annotations__r   r        K/var/www/html/AdoubleTech/venv/lib/python3.12/site-packages/stripe/_file.pyCreateParamsr   !   sN    DI&&	 		 $$CDD	 
,
 	
	r.   r0   c                   <    e Zd ZU eed<   	 ee   ed<   	 ed   ed<   y)r   create
expires_atzLiteral['']|Dict[str, str]metadataN)r(   r)   r*   boolr,   r   intr-   r.   r/   CreateParamsFileLinkDatazFile.CreateParamsFileLinkData?   s1    	  $$	 :;;	r.   r7   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<   y	)
File.ListParamszFile.ListParamsCreated|intcreatedending_beforer   limitr   r   r   r   r    r!   #document_provider_identity_documentfinance_report_runfinancial_account_statementr"   identity_document_downloadabler#   r$   selfiesigma_scheduled_queryr%   r&   r'   starting_afterN)	r(   r)   r*   r   r,   r+   r
   r6   r   r-   r.   r/   
ListParamsr9   M   s    9::	 #3''	 DI&&	 3	 0
 	
*	 $C((	r.   rE   c                   T    e Zd ZU ee   ed<   	 ee   ed<   	 ee   ed<   	 ee   ed<   y)File.ListParamsCreatedgtgteltlteN)r(   r)   r*   r   r6   r,   r-   r.   r/   ListParamsCreatedrG   {   sH    	 	 	 	r.   rL   c                   $    e Zd ZU eee      ed<   y)File.RetrieveParamsr   N)r(   r)   r*   r   r
   r+   r,   r-   r.   r/   RetrieveParamsrN      s    DI&&	r.   rO   r:   r3   filenameidr   linksobjectr=   r'   sizetitletypeurlparamsr   returnc           	      f    d|d<   t        d| j                  d| j                         |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.
        multipart/form-datacontent_typer   postfilesrX   base_address)r   _static_request	class_urlclsrX   s     r/   r2   zFile.create   sC     "7~$	   
 	
r.   c           	         K   d|d<   t        d| j                  d| j                         |d       d{         S 7 w)r[   r\   r]   r   r^   r_   r`   N)r   _static_request_asyncrc   rd   s     r/   create_asynczFile.create_async   sQ      "7~++$	 ,  
 	
s   2?=
	?r9   c                     | j                  d| j                         |      }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rX   %Expected list object from API, got %s)rb   rc   
isinstancer   	TypeErrorrV   r(   re   rX   results      r/   listz	File.list   s]    
 $$MMO % 

 &*-7<((* 
 r.   c                    K   | j                  d| j                         |       d{   }t        |t              s!t	        dt        |      j                  z        |S 7 7w)rj   rk   rl   Nrm   )rg   rc   rn   r   ro   rV   r(   rp   s      r/   
list_asynczFile.list_async  sk      00MMO 1 
 

 &*-7<((* 
 
s   &A"A 8A"rN   c                 8     | |fi |}|j                          |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re   rQ   rX   instances       r/   retrievezFile.retrieve   s$     r$V$r.   c                 T   K    | |fi |}|j                          d{    |S 7 w)rv   N)refresh_asyncrx   s       r/   retrieve_asynczFile.retrieve_async+  s3      r$V$$$&&& 	's   (&(file_uploadc                      y)Nz	/v1/filesr-   )re   s    r/   rc   zFile.class_url<  s    r.   N)r(   r)   r*   __doc__r   r   r   r,   r   r0   r   r7   rE   rL   rO   r6   r   r+   r   classmethodr   r2   rh   rr   rt   rz   r}   OBJECT_NAME_ALTrc   r-   r.   r/   r   r      s>    .4K'&/*3~ <9 ,^ ,\I $  L  sm 	G Jz*++ FO 	( & I 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      sP    B * = 2 < <  *j (*=f*E j\	 
r.   