
    kh(                         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 d dlmZ d dlmZmZmZ d d	lmZ er0d 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! d dl"m#Z#  G d de      Z$y)    )
ListObject)Quote)$QuoteComputedUpfrontLineItemsService)QuoteLineItemService)RequestOptions)StripeService)sanitize_id)AnyOptionalcast)TYPE_CHECKING)QuoteAcceptParams)QuoteCancelParams)QuoteCreateParams)QuoteFinalizeQuoteParams)QuoteListParams)QuotePdfParams)QuoteRetrieveParams)QuoteUpdateParamsc            	           e Zd Z fdZ	 	 dded   dee   dee   fdZ	 	 dded   dee   dee   fdZ		 	 dded   dee   defd	Z
	 	 dded   dee   defd
Z	 	 ddeded   dee   defdZ	 	 ddeded   dee   defdZ	 	 ddeded   dee   defdZ	 	 ddeded   dee   defdZ	 	 ddeded   dee   defdZ	 	 ddeded   dee   defdZ	 	 ddeded   dee   defdZ	 	 ddeded   dee   defdZ	 	 ddeded   dee   defdZ	 	 ddeded   dee   defdZ	 	 ddeded   dee   defdZ	 	 ddeded   dee   defdZ xZS )QuoteServicec                     t         |   |       t        | j                        | _        t        | j                        | _        y )N)super__init__r   
_requestorcomputed_upfront_line_itemsr   
line_items)self	requestor	__class__s     U/var/www/api/v1/venv_fitandmore/lib/python3.12/site-packages/stripe/_quote_service.pyr   zQuoteService.__init__   s9    #0 	(
 /t?    paramsr   optionsreturnc           
      X    t        t        t           | j                  ddd||            S )0
        Returns a list of your quotes.
        get
/v1/quotesapibase_addressr#   r$   )r   r   r   _requestr   r#   r$   s      r!   listzQuoteService.list&   s9     uMM"  	
 		
r"   c           
      t   K   t        t        t           | j                  ddd||       d{         S 7 w)r'   r(   r)   r*   r+   N)r   r   r   _request_asyncr.   s      r!   
list_asynczQuoteService.list_async9   sI      u%%" &  	
 		
s   +86
	8r   c           
      J    t        t        | j                  ddd||            S )
        A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the [quote template](https://dashboard.stripe.com/settings/billing/quote).
        postr)   r*   r+   )r   r   r-   r.   s      r!   createzQuoteService.createL   s4     MM"  	
 		
r"   c           
      f   K   t        t        | j                  ddd||       d{         S 7 w)r4   r5   r)   r*   r+   N)r   r   r1   r.   s      r!   create_asynczQuoteService.create_async_   sD      %%" &  	
 		
s   $1/
	1quoter   c                 |    t        t        | j                  ddj                  t	        |            d||            S )8
        Retrieves the quote with the given ID.
        r(   /v1/quotes/{quote}r9   r*   r+   r   r   r-   formatr	   r   r9   r#   r$   s       r!   retrievezQuoteService.retriever   sG     MM$+++e2D+E"  	
 		
r"   c                    K   t        t        | j                  ddj                  t	        |            d||       d{         S 7 w)r;   r(   r<   r=   r*   r+   Nr   r   r1   r?   r	   r@   s       r!   retrieve_asynczQuoteService.retrieve_async   sW      %%$+++e2D+E" &  	
 		
   =A
A
 	A
r   c                 |    t        t        | j                  ddj                  t	        |            d||            S )D
        A quote models prices and services for a customer.
        r5   r<   r=   r*   r+   r>   r@   s       r!   updatezQuoteService.update   sG     MM$+++e2D+E"  	
 		
r"   c                    K   t        t        | j                  ddj                  t	        |            d||       d{         S 7 w)rG   r5   r<   r=   r*   r+   NrC   r@   s       r!   update_asynczQuoteService.update_async   sW      %%$+++e2D+E" &  	
 		
rE   r   c                 |    t        t        | j                  ddj                  t	        |            d||            S ).
        Accepts the specified quote.
        r5   /v1/quotes/{quote}/acceptr=   r*   r+   r>   r@   s       r!   acceptzQuoteService.accept   G     MM+22U9K2L"  	
 		
r"   c                    K   t        t        | j                  ddj                  t	        |            d||       d{         S 7 w)rL   r5   rM   r=   r*   r+   NrC   r@   s       r!   accept_asynczQuoteService.accept_async   W      %%+22U9K2L" &  	
 		
rE   r   c                 |    t        t        | j                  ddj                  t	        |            d||            S )$
        Cancels the quote.
        r5   /v1/quotes/{quote}/cancelr=   r*   r+   r>   r@   s       r!   cancelzQuoteService.cancel   rO   r"   c                    K   t        t        | j                  ddj                  t	        |            d||       d{         S 7 w)rT   r5   rU   r=   r*   r+   NrC   r@   s       r!   cancel_asynczQuoteService.cancel_async   rR   rE   r   c                 |    t        t        | j                  ddj                  t	        |            d||            S )&
        Finalizes the quote.
        r5   /v1/quotes/{quote}/finalizer=   r*   r+   r>   r@   s       r!   finalize_quotezQuoteService.finalize_quote  sG     MM-44;u;M4N"  	
 		
r"   c                    K   t        t        | j                  ddj                  t	        |            d||       d{         S 7 w)rZ   r5   r[   r=   r*   r+   NrC   r@   s       r!   finalize_quote_asyncz!QuoteService.finalize_quote_async&  sW      %%-44;u;M4N" &  	
 		
rE   r   c                 |    t        t        | j                  ddj                  t	        |            d||            S )
        Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf)
        r(   /v1/quotes/{quote}/pdfr=   filesr+   )r   r
   _request_streamr?   r	   r@   s       r!   pdfzQuoteService.pdf:  sI       (//k%6H/I$ ! 	
 		
r"   c                    K   t        t        | j                  ddj                  t	        |            d||       d{         S 7 w)r`   r(   ra   r=   rb   r+   N)r   r
   _request_stream_asyncr?   r	   r@   s       r!   	pdf_asynczQuoteService.pdf_asyncN  sW      ,,(//k%6H/I$ -  	
 		
rE   )NN)__name__
__module____qualname__r   r   r   r   r   r/   r2   r6   r8   strrA   rD   rH   rJ   rN   rQ   rV   rX   r\   r^   r
   rd   rg   __classcell__)r    s   @r!   r   r      s   @ /3,0
*+
 .)
 
E		
* /3,0
*+
 .)
 
E		
* 15,0
,-
 .)
 
	
* 15,0
,-
 .)
 
	
, 37,0	

 ./
 .)	

 

. 37,0	

 ./
 .)	

 

. 15,0	

 ,-
 .)	

 

. 15,0	

 ,-
 .)	

 

. 15,0	

 ,-
 .)	

 

. 15,0	

 ,-
 .)	

 

. 15,0	

 ,-
 .)	

 

. 15,0	

 ,-
 .)	

 

. 8<,0	

 34
 .)	

 

. 8<,0	

 34
 .)	

 

. .2,0	

 )*
 .)	

 

. .2,0	

 )*
 .)	

 

r"   r   N)%stripe._list_objectr   stripe._quoter   1stripe._quote_computed_upfront_line_items_servicer   stripe._quote_line_item_servicer   stripe._request_optionsr   stripe._stripe_servicer   stripe._utilr	   typingr
   r   r   typing_extensionsr   "stripe.params._quote_accept_paramsr   "stripe.params._quote_cancel_paramsr   "stripe.params._quote_create_paramsr   *stripe.params._quote_finalize_quote_paramsr    stripe.params._quote_list_paramsr   stripe.params._quote_pdf_paramsr   $stripe.params._quote_retrieve_paramsr   "stripe.params._quote_update_paramsr   r    r"   r!   <module>r      sX    +  A 2 0 $ & & +DDD A>HDD
= D
r"   