o
    iT                     @   s   d dl mZ d dlmZ d dlmZmZ d dlmZ erFd 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 d dlmZ G dd deZdS )    )StripeService)sanitize_id)Optionalcast)TYPE_CHECKING)Dispute)
ListObject)RequestOptions)DisputeCloseParams)DisputeListParams)DisputeRetrieveParams)DisputeUpdateParamsc                	   @   sD  e Zd Z		dded ded ddfdd	Z		dded ded ddfd
dZ		ddeded ded ddfddZ		ddeded ded ddfddZ		ddeded ded ddfddZ			ddeded ded ddfddZ
		ddeded ded ddfddZ		ddeded ded ddfddZdS )DisputeServiceNparamsr   optionsr	   returnListObject[Dispute]c              	   C   s   t d| jddd||dS )2
        Returns a list of your disputes.
        r   get/v1/disputesapibase_addressr   r   )r   _requestselfr   r    r   w/var/www/snowflake_co_dev_github/snow_flake_back_end_deploy/env/lib/python3.10/site-packages/stripe/_dispute_service.pylist   s   zDisputeService.listc              	      s"   t d| jddd||dI dH S )r   r   r   r   r   r   N)r   _request_asyncr   r   r   r   
list_async&   s   
zDisputeService.list_asyncdisputer   r   c              	   C   &   t d| jddjt|dd||dS ):
        Retrieves the dispute with the given ID.
        r   r   /v1/disputes/{dispute}r!   r   r   r   r   formatr   r   r!   r   r   r   r   r   retrieve9   s   	zDisputeService.retrievec              	      .   t d| jddjt|dd||dI dH S )r#   r   r   r$   r%   r   r   Nr   r   r'   r   r(   r   r   r   retrieve_asyncM   s   	
zDisputeService.retrieve_asyncr   c              	   C   r"   )S  
        When you get a dispute, contacting your customer is always the best first step. If that doesn't work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your [dashboard](https://dashboard.stripe.com/disputes), but if you prefer, you can use the API to submit evidence programmatically.

        Depending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our [guide to dispute types](https://docs.stripe.com/docs/disputes/categories).
        r   postr$   r%   r   r   r&   r(   r   r   r   updatea   s   zDisputeService.updatec              	      r*   )r-   r   r.   r$   r%   r   r   Nr+   r(   r   r   r   update_asyncw   s   
zDisputeService.update_asyncr
   c              	   C   r"   )  
        Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.

        The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.
        r   r.   /v1/disputes/{dispute}/closer%   r   r   r&   r(   r   r   r   close   s   zDisputeService.closec              	      r*   )r1   r   r.   r2   r%   r   r   Nr+   r(   r   r   r   close_async   s   
zDisputeService.close_async)NN)__name__
__module____qualname__r   r   r    strr)   r,   r/   r0   r3   r4   r   r   r   r   r      s    






r   N)stripe._stripe_servicer   stripe._utilr   typingr   r   typing_extensionsr   stripe._disputer   stripe._list_objectr   stripe._request_optionsr	   #stripe.params._dispute_close_paramsr
   "stripe.params._dispute_list_paramsr   &stripe.params._dispute_retrieve_paramsr   $stripe.params._dispute_update_paramsr   r   r   r   r   r   <module>   s   