o
    if                     @   s   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 er>d dlmZ d dlmZ d dlmZ d d	lmZ G d
d ded ZdS )    )ExpandableField)
ListObject)ListableAPIResource)ClassVarOptional)LiteralUnpackTYPE_CHECKING)Charge)PaymentIntent)EarlyFraudWarningListParams)EarlyFraudWarningRetrieveParamsc                   @   s   e Zd ZU dZdZeed  ed< eed< 	 e	d ed< 	 e
ed< 	 eed< 	 eed	< 	 eed
< 	 ed ed< 	 ee	d  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S )EarlyFraudWarningz
    An early fraud warning indicates that the card issuer has notified us that a
    charge may be fraudulent.

    Related guide: [Early fraud warnings](https://stripe.com/docs/disputes/measuring#early-fraud-warnings)
    zradar.early_fraud_warningOBJECT_NAME
actionabler
   chargecreated
fraud_typeidlivemodeobjectr   payment_intentparamsr   returnc                 K   s4   | j d|  |d}t|tstdt|j |S )9
        Returns a list of early fraud warnings.
        getr   %Expected list object from API, got %s)_static_request	class_url
isinstancer   	TypeErrortype__name__clsr   result r'   /var/www/snowflake_co_dev_github/snow_flake_back_end_deploy/env/lib/python3.10/site-packages/stripe/radar/_early_fraud_warning.pylist@   s   
zEarlyFraudWarning.listc                    s<   | j d|  |dI dH }t|tstdt|j |S )r   r   r   Nr   )_static_request_asyncr   r    r   r!   r"   r#   r$   r'   r'   r(   
list_asyncT   s   
zEarlyFraudWarning.list_asyncr   c                 K   s   | |fi |}|   |S )
        Retrieves the details of an early fraud warning that has previously been created.

        Please refer to the [early fraud warning](https://docs.stripe.com/api#early_fraud_warning_object) object reference for more details.
        )refreshr%   r   r   instancer'   r'   r(   retrieveh   s   	zEarlyFraudWarning.retrievec                    s$   | |fi |}|  I dH  |S )r,   N)refresh_asyncr.   r'   r'   r(   retrieve_asyncu   s   	z EarlyFraudWarning.retrieve_asyncN)r#   
__module____qualname____doc__r   r   r   __annotations__boolr   intstrr   classmethodr   r   r)   r+   r0   r2   r'   r'   r'   r(   r      s`   
 r   N)stripe._expandable_fieldr   stripe._list_objectr   stripe._listable_api_resourcer   typingr   r   typing_extensionsr   r   r	   stripe._charger
   stripe._payment_intentr   4stripe.params.radar._early_fraud_warning_list_paramsr   8stripe.params.radar._early_fraud_warning_retrieve_paramsr   r   r'   r'   r'   r(   <module>   s   