o
    Biu$                     @   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	 d dl
mZmZmZmZ d dlmZmZmZ G dd	 d	eZd
S )    )File)
ListObject)RequestOptions)StripeService)sanitize_id)AnyDictListcast)LiteralNotRequired	TypedDictc                	   @   s  e Zd 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i i fddde	de
e fddZi i fddde	de
e fddZi fddde	defddZi fddde	defddZi i fdeddde	defddZi i fdeddde	defddZdS )FileServicec                   @   sD   e Zd ZU eee  ed< 	 eed< 	 ed ed< 	 ed ed< dS )FileService.CreateParamsexpandfile$FileService.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    r%   r%   T/var/www/html/Trade-python/venv/lib/python3.10/site-packages/stripe/_file_service.pyCreateParams   s   
 r'   c                   @   s2   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%   r&   CreateParamsFileLinkData+   s   
 r-   c                   @   sh   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 )
FileService.ListParamsz!FileService.ListParamsCreated|intcreatedending_beforer   limit)r   r   r   r   r   r   #document_provider_identity_documentfinance_report_runr   identity_document_downloadabler   r   selfiesigma_scheduled_queryr   r   r   starting_afterN)	r    r!   r"   r   r$   r#   r	   r,   r   r%   r%   r%   r&   
ListParams9   s"   
 r8   c                   @   sD   e Zd ZU ee ed< 	 ee ed< 	 ee ed< 	 ee ed< dS )zFileService.ListParamsCreatedgtgteltlteN)r    r!   r"   r   r,   r$   r%   r%   r%   r&   ListParamsCreatedf   s   
 r=   c                   @   s   e Zd ZU eee  ed< dS )FileService.RetrieveParamsr   N)r    r!   r"   r   r	   r#   r$   r%   r%   r%   r&   RetrieveParamsx   s   
 r?   paramsr.   optionsreturnc              	   C   s   t tt | jddd||d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	/v1/filesapibase_addressr@   rA   )r
   r   r   _requestselfr@   rA   r%   r%   r&   list~   s   zFileService.listc              	      s&   t tt | jddd||dI dH S )rC   rD   rE   rF   rG   N)r
   r   r   _request_asyncrJ   r%   r%   r&   
list_async   s   
zFileService.list_asyncr   c              	   C   s"   d|d< t t| j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.
        multipart/form-datacontent_typepostrE   filesrG   )r
   r   rI   rJ   r%   r%   r&   r(      s   zFileService.createc              	      s*   d|d< t t| jddd||dI dH S )rO   rP   rQ   rR   rE   rS   rG   N)r
   r   rM   rJ   r%   r%   r&   create_async   s   
zFileService.create_asyncr   r>   c              	   C   s&   t t| jddjt|dd||d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).
        rD   /v1/files/{file}r   rF   rG   )r
   r   rI   formatr   rK   r   r@   rA   r%   r%   r&   retrieve   s   	zFileService.retrievec              	      s.   t t| jddjt|dd||dI dH S )rU   rD   rV   rW   rF   rG   N)r
   r   rM   rX   r   rY   r%   r%   r&   retrieve_async   s   	
zFileService.retrieve_asyncN)r    r!   r"   r   r'   r-   r8   r=   r?   r   r   r   rL   rN   r(   rT   r#   rZ   r[   r%   r%   r%   r&   r      s|    -




r   N)stripe._filer   stripe._list_objectr   stripe._request_optionsr   stripe._stripe_servicer   stripe._utilr   typingr   r   r	   r
   typing_extensionsr   r   r   r   r%   r%   r%   r&   <module>   s   