o
    Bi                     @   st   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 d dlmZmZmZ G dd	 d	eZd
S )    )
ListObject)RequestOptions)StripeService)sanitize_id)ReceivedCredit)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i fddd	ed
ee	 fddZ
i fddd	ed
e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 )ReceivedCreditServicec                   @   sr   e Zd ZU ee ed< 	 eee  ed< 	 eed< 	 ee ed< 	 ed ed< 	 ee ed< 	 eed  ed	< d
S ) ReceivedCreditService.ListParamsending_beforeexpandfinancial_accountlimit+ReceivedCreditService.ListParamsLinkedFlowslinked_flowsstarting_after)failed	succeededstatusN)	__name__
__module____qualname__r
   str__annotations__r   intr	    r   r   h/var/www/html/Trade-python/venv/lib/python3.10/site-packages/stripe/treasury/_received_credit_service.py
ListParams   s"   
 r    c                   @   s   e Zd ZU ed ed< dS )r   )credit_reversalotheroutbound_paymentpayoutsource_flow_typeN)r   r   r   r	   r   r   r   r   r   ListParamsLinkedFlows-   s
   
 r&   c                   @   s   e Zd ZU eee  ed< dS )$ReceivedCreditService.RetrieveParamsr   N)r   r   r   r
   r   r   r   r   r   r   r   RetrieveParams5   s   
 r(   paramsr   optionsreturnc              	   C   s   t tt | jddd||dS )4
        Returns a list of ReceivedCredits.
        get/v1/treasury/received_creditsapibase_addressr)   r*   )r   r   r   _requestselfr)   r*   r   r   r   list;   s   zReceivedCreditService.listc              	      s&   t tt | jddd||dI dH S )r,   r-   r.   r/   r0   N)r   r   r   _request_asyncr3   r   r   r   
list_asyncN   s   
z ReceivedCreditService.list_asyncidr'   c              	   C   s&   t t| jddjt|dd||dS )
        Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list.
        r-   "/v1/treasury/received_credits/{id}r8   r/   r0   )r   r   r2   formatr   r4   r8   r)   r*   r   r   r   retrievea   s   	zReceivedCreditService.retrievec              	      s.   t t| jddjt|dd||dI dH S )r9   r-   r:   r;   r/   r0   N)r   r   r6   r<   r   r=   r   r   r   retrieve_asyncw   s   	
z$ReceivedCreditService.retrieve_asyncN)r   r   r   r   r    r&   r(   r   r   r   r5   r7   r   r>   r?   r   r   r   r   r      sT     	


r   N)stripe._list_objectr   stripe._request_optionsr   stripe._stripe_servicer   stripe._utilr    stripe.treasury._received_creditr   typingr   r   typing_extensionsr	   r
   r   r   r   r   r   r   <module>   s   