o
    i+                     @   s  d dl mZ d dlmZ d dlmZmZ d dlmZ d dl	m
Z
 e
rvd 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 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gddgdZ&G dd deZ'dS )    )StripeService)sanitize_id)Optionalcast)import_module)TYPE_CHECKING)
ListObject)Quote)$QuoteComputedUpfrontLineItemsService)QuoteLineItemService)RequestOptions)QuoteAcceptParams)QuoteCancelParams)QuoteCreateParams)QuoteFinalizeQuoteParams)QuoteListParams)QuotePdfParams)QuoteRetrieveParams)QuoteUpdateParams)Anyz1stripe._quote_computed_upfront_line_items_servicer
   zstripe._quote_line_item_servicer   )computed_upfront_line_items
line_itemsc                	       s  e Zd ZU ded< ded<  fddZd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 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: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d0d1Z				d:ded
ed/ ded ddfd2d3Z				d:ded
ed4 ded dd5fd6d7Z				d:ded
ed4 ded dd5fd8d9Z  ZS );QuoteServicer
   r   r   r   c                    s   t  | d S N)super__init__)self	requestor	__class__ u/var/www/snowflake_co_dev_github/snow_flake_back_end_deploy/env/lib/python3.10/site-packages/stripe/_quote_service.pyr   *   s   zQuoteService.__init__c                 C   sN   zt | \}}tt||}t| ||| j t| |W S  ty&   t w r   )_subservicesgetattrr   setattr
_requestorKeyErrorAttributeError)r   nameimport_fromserviceservice_classr    r    r!   __getattr__-   s   zQuoteService.__getattr__Nparamsr   optionsr   returnListObject[Quote]c              	   C      t d| jddd||dS )0
        Returns a list of your quotes.
        r0   get
/v1/quotesapibase_addressr-   r.   r   _requestr   r-   r.   r    r    r!   list=      zQuoteService.listc              	      "   t d| jddd||dI dH S )r2   r0   r3   r4   r5   r6   Nr   _request_asyncr:   r    r    r!   
list_asyncP      
zQuoteService.list_asyncr   r	   c              	   C   r1   )
        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).
        r	   postr4   r5   r6   r8   r:   r    r    r!   createc   r<   zQuoteService.createc              	      r=   )rB   r	   rC   r4   r5   r6   Nr>   r:   r    r    r!   create_asyncv   rA   zQuoteService.create_asyncquoter   c              	   C   &   t d| jddjt|dd||dS )8
        Retrieves the quote with the given ID.
        r	   r3   /v1/quotes/{quote}rF   r5   r6   r   r9   formatr   r   rF   r-   r.   r    r    r!   retrieve      	zQuoteService.retrievec              	      .   t d| jddjt|dd||dI dH S )rH   r	   r3   rI   rJ   r5   r6   Nr   r?   rL   r   rM   r    r    r!   retrieve_async      	
zQuoteService.retrieve_asyncr   c              	   C   rG   )D
        A quote models prices and services for a customer.
        r	   rC   rI   rJ   r5   r6   rK   rM   r    r    r!   update   rO   zQuoteService.updatec              	      rP   )rT   r	   rC   rI   rJ   r5   r6   NrQ   rM   r    r    r!   update_async   rS   zQuoteService.update_asyncr   c              	   C   rG   ).
        Accepts the specified quote.
        r	   rC   /v1/quotes/{quote}/acceptrJ   r5   r6   rK   rM   r    r    r!   accept   rO   zQuoteService.acceptc              	      rP   )rW   r	   rC   rX   rJ   r5   r6   NrQ   rM   r    r    r!   accept_async   rS   zQuoteService.accept_asyncr   c              	   C   rG   )$
        Cancels the quote.
        r	   rC   /v1/quotes/{quote}/cancelrJ   r5   r6   rK   rM   r    r    r!   cancel  rO   zQuoteService.cancelc              	      rP   )r[   r	   rC   r\   rJ   r5   r6   NrQ   rM   r    r    r!   cancel_async  rS   zQuoteService.cancel_asyncr   c              	   C   rG   )&
        Finalizes the quote.
        r	   rC   /v1/quotes/{quote}/finalizerJ   r5   r6   rK   rM   r    r    r!   finalize_quote)  rO   zQuoteService.finalize_quotec              	      rP   )r_   r	   rC   r`   rJ   r5   r6   NrQ   rM   r    r    r!   finalize_quote_async=  rS   z!QuoteService.finalize_quote_asyncr   r   c              	   C   rG   )
        Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf)
        r   r3   /v1/quotes/{quote}/pdfrJ   filesr6   )r   _request_streamrL   r   rM   r    r    r!   pdfQ  rO   zQuoteService.pdfc              	      rP   )rc   r   r3   rd   rJ   re   r6   N)r   _request_stream_asyncrL   r   rM   r    r    r!   	pdf_asynce  rS   zQuoteService.pdf_async)NN)__name__
__module____qualname____annotations__r   r,   r   r;   r@   rD   rE   strrN   rR   rU   rV   rY   rZ   r]   r^   ra   rb   rg   ri   __classcell__r    r    r   r!   r   &   sZ  
 














r   N)(stripe._stripe_servicer   stripe._utilr   typingr   r   	importlibr   typing_extensionsr   stripe._list_objectr   stripe._quoter	   1stripe._quote_computed_upfront_line_items_servicer
   stripe._quote_line_item_servicer   stripe._request_optionsr   "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   r    r    r    r!   <module>   s4   	