o
    i                     @   s   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mZ d dlmZmZmZ erHd 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 ed ZdS )    )CreateableAPIResource)
ListObject)ListableAPIResource)StripeObject)ClassVarListOptionalcast)LiteralUnpackTYPE_CHECKING)File)ReportRunCreateParams)ReportRunListParams)ReportRunRetrieveParamsc                   @   s\  e Zd ZU dZdZeed  ed< G dd deZ	e
ed< 	 ee ed< 	 eed< 	 eed	< 	 ed ed
< 	 e	ed< eed< 	 ed ed< 	 eed< 	 ee
 ed< 	 eded dd fddZeded dd fddZ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 )#	ReportRunaf  
    The Report Run object represents an instance of a report type generated with
    specific run parameters. Once the object is created, Stripe begins processing the report.
    When the report has finished running, it will give you a reference to a file
    where you can retrieve your results. For an overview, see
    [API Access to Reports](https://stripe.com/docs/reporting/statements/api).

    Note that certain report types can only be run based on your live-mode data (not test-mode
    data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).
    zreporting.report_runOBJECT_NAMEc                   @   s   e Zd ZU eee  ed< 	 ee ed< 	 ee ed< 	 ee ed< 	 ee ed< 	 ee ed< 	 ee ed< 	 ee ed< d	S )
zReportRun.Parameterscolumnsconnected_accountcurrencyinterval_endinterval_startpayoutreporting_categorytimezoneN)__name__
__module____qualname__r   r   str__annotations__int r!   r!   |/var/www/snowflake_co_dev_github/snow_flake_back_end_deploy/env/lib/python3.10/site-packages/stripe/reporting/_report_run.py
Parameters*   s"   
 r#   createderroridlivemodeobject
parametersreport_typer   resultstatussucceeded_atparamsr   returnc                 K   s   t d| jd|  |dS )
        Creates a new object and begin running the report. (Certain report types require a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).)
        r   postr.   )r	   _static_request	class_urlclsr.   r!   r!   r"   createw   s   zReportRun.createc                    s"   t d| jd|  |dI dH S )r0   r   r1   r2   N)r	   _static_request_asyncr4   r5   r!   r!   r"   create_async   s   
zReportRun.create_asyncr   c                 K   s4   | j d|  |d}t|tstdt|j |S )V
        Returns a list of Report Runs, with the most recent appearing first.
        getr2   %Expected list object from API, got %s)r3   r4   
isinstancer   	TypeErrortyper   r6   r.   r+   r!   r!   r"   list   s   
zReportRun.listc                    s<   | j d|  |dI dH }t|tstdt|j |S )r:   r;   r2   Nr<   )r8   r4   r=   r   r>   r?   r   r@   r!   r!   r"   
list_async   s   
zReportRun.list_asyncr   c                 K   s   | |fi |}|   |S )B
        Retrieves the details of an existing Report Run.
        )refreshr6   r&   r.   instancer!   r!   r"   retrieve   s   zReportRun.retrievec                    s$   | |fi |}|  I dH  |S )rC   N)refresh_asyncrE   r!   r!   r"   retrieve_async   s   zReportRun.retrieve_asyncN)r   r   r   __doc__r   r   r
   r   r   r#   r    r   r   boolclassmethodr   r7   r9   r   rA   rB   rG   rI   _inner_class_typesr!   r!   r!   r"   r      sz   
 "

r   N)stripe._createable_api_resourcer   stripe._list_objectr   stripe._listable_api_resourcer   stripe._stripe_objectr   typingr   r   r   r	   typing_extensionsr
   r   r   stripe._filer   1stripe.params.reporting._report_run_create_paramsr   /stripe.params.reporting._report_run_list_paramsr   3stripe.params.reporting._report_run_retrieve_paramsr   r   r!   r!   r!   r"   <module>   s   
