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	m
Z
mZ d dlmZmZmZmZ G dd ded Zd	S )
    )
ListObject)ListableAPIResource)RequestOptions)StripeObject)ClassVarListOptional)LiteralNotRequired	TypedDictUnpackc                   @   st  e Zd ZU dZdZeed  ed< 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eed< 	 eed< 	 eed< 	 eed< 	 eed< 	 eed< 	 ed ed< 	 ed ed< 	 e	ed< eed< 	 eed< 	 eed< 	 eded ded  fddZeded ded  fd d!Zededed" dd fd#d$Zededed" dd fd%d&Zde	iZd'S )(Transactionzk
    A Transaction represents a real transaction that affects a Financial Connections Account balance.
    z!financial_connections.transactionOBJECT_NAMEc                   @   s(   e Zd ZU ee ed< 	 ee ed< dS )zTransaction.StatusTransitions	posted_atvoid_atN)__name__
__module____qualname__r   int__annotations__ r   r   i/var/www/html/Trade-python/venv/lib/python3.10/site-packages/stripe/financial_connections/_transaction.pyStatusTransitions   s
   
 r   c                   @   sn   e Zd ZU eed< 	 ee ed< 	 eee  ed< 	 ee ed< 	 ee ed< 	 ed ed< 	 ed ed	< d
S )Transaction.ListParamsaccountending_beforeexpandlimitstarting_afterz&Transaction.ListParamsTransactedAt|inttransacted_at(Transaction.ListParamsTransactionRefreshtransaction_refreshN)r   r   r   strr   r
   r   r   r   r   r   r   
ListParams   s"   
 r#   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"Transaction.ListParamsTransactedAtgtgteltlteN)r   r   r   r
   r   r   r   r   r   r   ListParamsTransactedAt>   s   
 r(   c                   @   s   e Zd ZU eed< dS )r    afterN)r   r   r   r"   r   r   r   r   r   ListParamsTransactionRefreshP   s   
 r*   c                   @   s   e Zd ZU eee  ed< dS )Transaction.RetrieveParamsr   N)r   r   r   r
   r   r"   r   r   r   r   r   RetrieveParamsV   s   
 r,   r   amountcurrencydescriptionidlivemodeobject)pendingpostedvoidstatusstatus_transitionsr   r!   updatedparamsr   returnc                 K   s4   | j d|  |d}t|tstdt|j |S )N
        Returns a list of Financial Connections Transaction objects.
        getr9   %Expected list object from API, got %s)_static_request	class_url
isinstancer   	TypeErrortyper   clsr9   resultr   r   r   list   s   
zTransaction.listc                    s<   | j d|  |dI dH }t|tstdt|j |S )r;   r<   r=   Nr>   )_static_request_asyncr@   rA   r   rB   rC   r   rD   r   r   r   
list_async   s   
zTransaction.list_asyncr+   c                 K   s   | |fi |}|   |S )N
        Retrieves the details of a Financial Connections Transaction
        )refreshrE   r0   r9   instancer   r   r   retrieve   s   zTransaction.retrievec                    s$   | |fi |}|  I dH  |S )rJ   N)refresh_asyncrL   r   r   r   retrieve_async   s   zTransaction.retrieve_asyncN)r   r   r   __doc__r   r   r	   r   r   r   r   r#   r   r(   r*   r,   r"   r   boolclassmethodr   r   rG   rI   rN   rP   _inner_class_typesr   r   r   r   r      sz   
 
 

r   N)stripe._list_objectr   stripe._listable_api_resourcer   stripe._request_optionsr   stripe._stripe_objectr   typingr   r   r   typing_extensionsr	   r
   r   r   r   r   r   r   r   <module>   s   