
    Ch.                         S SK Jr  S SKJr  S SKJr  S SKJr  S SKJ	r	J
r
JrJrJrJr  S SKJrJrJrJrJr  \(       a  S SKJr   " S S	\S	   \S	   5      r\rg
)    )CreateableAPIResource)
ListObject)ListableAPIResource)RequestOptions)AnyClassVarDictListOptionalcast)LiteralNotRequired	TypedDictUnpackTYPE_CHECKING)FileLinkc                   P   \ rS rSr% SrSr\\S      \S'    " S S\	5      r
 " S S\5      r " S	 S
\	5      r " S S\5      r " S S\	5      r\\S'    \\   \S'    \\   \S'    \\S'    \\S      \S'    \S   \S'    \S   \S'    \\S'    \\   \S'    \\   \S'    \\   \S'    \S\S   SS 4S j5       r\S\S   SS 4S  j5       r\S\S!   S\S    4S" j5       r\S\S!   S\S    4S# j5       r\S\S\S$   SS 4S% j5       r\S\S\S$   SS 4S& j5       rS'r\S( 5       rS)rg*)+File   a  
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://docs.stripe.com/api#scheduled_queries)).

Related guide: [File upload guide](https://stripe.com/docs/file-upload)
fileOBJECT_NAMEc                   \    \ rS rSr% \\\      \S'    \\S'    \S   \S'    \	S   \S'   Sr
g	)
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_android_apkterminal_reader_splashscreenpurpose N)__name__
__module____qualname____firstlineno__r   r
   str__annotations__r   r   __static_attributes__r+       O/home/kali/devsecops-assessor/venv/lib/python3.13/site-packages/stripe/_file.pyCreateParamsr   !   sN    DI&&	 		 $$CDD	 ,
 	
	r3   r5   c                   D    \ rS rSr% \\S'    \\   \S'    \S   \S'   Srg)r   @   create
expires_atzLiteral['']|Dict[str, str]metadatar+   N)	r,   r-   r.   r/   boolr1   r   intr2   r+   r3   r4   CreateParamsFileLinkDataFile.CreateParamsFileLinkData@   s1    	  $$	 :;;	r3   r=   c                       \ rS rSr% \S   \S'    \\   \S'    \\\      \S'    \\   \S'    \\	S      \S'    \\   \S	'   S
r
g)File.ListParamsN   z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)   r*   starting_afterr+   N)r,   r-   r.   r/   r   r1   r0   r
   r<   r   r2   r+   r3   r4   
ListParamsr@   N   s    9::	 #3''	 DI&&	 3	 0
 	
,	 $C((	r3   rM   c                   \    \ rS rSr% \\   \S'    \\   \S'    \\   \S'    \\   \S'   Srg)File.ListParamsCreated}   gtgteltlter+   N)r,   r-   r.   r/   r   r<   r1   r2   r+   r3   r4   ListParamsCreatedrO   }   sH    	 	 	 	r3   rU   c                   ,    \ rS rSr% \\\      \S'   Srg)File.RetrieveParams   r   r+   N)	r,   r-   r.   r/   r   r
   r0   r1   r2   r+   r3   r4   RetrieveParamsrW      s    DI&&	r3   rY   rB   r9   filenameidr   linksobjectrE   r*   sizetitletypeurlparamsr   returnc           
      `    SUS'   [        SU R                  SU R                  5       USS95      $ )  
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rb   base_address)r   _static_request	class_urlclsrb   s     r4   r8   File.create   sC     "7~$	   
 	
r3   c           
      |   #    SUS'   [        SU R                  SU R                  5       USS9I Sh  vN 5      $  N7f)re   rf   rg   r   rh   ri   rj   N)r   _static_request_asyncrm   rn   s     r4   create_asyncFile.create_async   sP      "7~++$	 ,  
 	
s   /<:
	<r@   c                     U R                  SU R                  5       US9n[        U[        5      (       d!  [	        S[        U5      R                  -  5      eU$ )
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rb   %Expected list object from API, got %s)rl   rm   
isinstancer   	TypeErrorr`   r,   ro   rb   results      r4   list	File.list   s`    
 $$MMO % 

 &*--7<((* 
 r3   c                    #    U R                  SU R                  5       US9I Sh  vN n[        U[        5      (       d!  [	        S[        U5      R                  -  5      eU$  N<7f)rv   rw   rx   Nry   )rr   rm   rz   r   r{   r`   r,   r|   s      r4   
list_asyncFile.list_async  sm      00MMO 1 
 

 &*--7<((* 
 
s   #A$A"=A$rW   c                 8    U " U40 UD6nUR                  5         U$ )
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://docs.stripe.com/docs/file-upload#download-file-contents).
)refreshro   r[   rb   instances       r4   retrieveFile.retrieve#  s$     r$V$r3   c                 T   #    U " U40 UD6nUR                  5       I Sh  vN   U$  N7f)r   N)refresh_asyncr   s       r4   retrieve_asyncFile.retrieve_async.  s2      r$V$$$&&& 	's   (&(file_uploadc                     g)Nz	/v1/filesr+   )ro   s    r4   rm   File.class_url?  s    r3   r+   N)r,   r-   r.   r/   __doc__r   r   r   r1   r   r5   r   r=   rM   rU   rY   r<   r   r0   r   classmethodr   r8   rs   r~   r   r   r   OBJECT_NAME_ALTrm   r2   r+   r3   r4   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 r3   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+   r3   r4   <module>r      sP    B * = 2 < <  *m (*=f*E mb	 
r3   