o
    Bi,                     @   sx   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 d dlmZmZmZ G dd	 d	eZd
S )    )
ListObject)RequestOptions)StripeService)Topup)sanitize_id)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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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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 )-TopupServicec                   @      e Zd ZU eee  ed< dS )TopupService.CancelParamsexpandN__name__
__module____qualname__r   r   str__annotations__ r   r   U/var/www/html/Trade-python/venv/lib/python3.10/site-packages/stripe/_topup_service.pyCancelParams      
 r   c                   @   sx   e Zd ZU eed< 	 eed< 	 ee ed< 	 eee  ed< 	 ed ed< 	 ee ed< 	 ee ed< 	 ee ed	< d
S )TopupService.CreateParamsamountcurrencydescriptionr   Literal['']|Dict[str, str]metadatasourcestatement_descriptortransfer_groupN)r   r   r   intr   r   r   r   r   r   r   r   CreateParams   s"   
 r%   c                   @   sv   e Zd ZU ed ed< 	 ed ed< 	 ee ed< 	 eee  ed< 	 ee ed< 	 ee ed< 	 eed	  ed
< dS )TopupService.ListParamsz!TopupService.ListParamsAmount|intr   z"TopupService.ListParamsCreated|intcreatedending_beforer   limitstarting_after)canceledfailedpending	succeededstatusN)	r   r   r   r   r   r   r   r$   r
   r   r   r   r   
ListParams5   s"   
 r0   c                   @   D   e Zd ZU ee ed< 	 ee ed< 	 ee ed< 	 ee ed< dS )zTopupService.ListParamsAmountgtgteltlteNr   r   r   r   r$   r   r   r   r   r   ListParamsAmountU      
 r7   c                   @   r1   )zTopupService.ListParamsCreatedr2   r3   r4   r5   Nr6   r   r   r   r   ListParamsCreatedg   r8   r9   c                   @   r   )TopupService.RetrieveParamsr   Nr   r   r   r   r   RetrieveParamsy   r   r;   c                   @   s:   e Zd ZU ee ed< 	 eee  ed< 	 ed ed< dS )TopupService.UpdateParamsr   r   r   r    N)r   r   r   r   r   r   r   r   r   r   r   UpdateParams   s   
 r=   paramsr&   optionsreturnc              	   C   s   t tt | jddd||dS ),
        Returns a list of top-ups.
        get
/v1/topupsapibase_addressr>   r?   )r	   r   r   _requestselfr>   r?   r   r   r   list   s   zTopupService.listc              	      s&   t tt | jddd||dI dH S )rA   rB   rC   rD   rE   N)r	   r   r   _request_asyncrH   r   r   r   
list_async   s   
zTopupService.list_asyncr   c              	   C   s   t t| jddd||dS )2
        Top up the balance of an account
        postrC   rD   rE   )r	   r   rG   rH   r   r   r   create   s   zTopupService.createc              	      s"   t t| jddd||dI dH S )rM   rN   rC   rD   rE   N)r	   r   rK   rH   r   r   r   create_async   s   
zTopupService.create_asynctopupr:   c              	   C   &   t t| jddjt|dd||dS )
        Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information.
        rB   /v1/topups/{topup}rQ   rD   rE   r	   r   rG   formatr   rI   rQ   r>   r?   r   r   r   retrieve      	zTopupService.retrievec              	      .   t t| jddjt|dd||dI dH S )rS   rB   rT   rU   rD   rE   Nr	   r   rK   rW   r   rX   r   r   r   retrieve_async      	
zTopupService.retrieve_asyncr<   c              	   C   rR   )d
        Updates the metadata of a top-up. Other top-up details are not editable by design.
        rN   rT   rU   rD   rE   rV   rX   r   r   r   update   rZ   zTopupService.updatec              	      r[   )r_   rN   rT   rU   rD   rE   Nr\   rX   r   r   r   update_async  r^   zTopupService.update_asyncr   c              	   C   rR   )I
        Cancels a top-up. Only pending top-ups can be canceled.
        rN   /v1/topups/{topup}/cancelrU   rD   rE   rV   rX   r   r   r   cancel%  rZ   zTopupService.cancelc              	      r[   )rb   rN   rc   rU   rD   rE   Nr\   rX   r   r   r   cancel_async9  r^   zTopupService.cancel_asyncN)r   r   r   r   r   r%   r0   r7   r9   r;   r=   r   r   r   rJ   rL   rO   rP   r   rY   r]   r`   ra   rd   re   r   r   r   r   r      s    " 








r   N)stripe._list_objectr   stripe._request_optionsr   stripe._stripe_servicer   stripe._topupr   stripe._utilr   typingr   r   r	   typing_extensionsr
   r   r   r   r   r   r   r   <module>   s   