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 er: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)InvoiceLineItem)
ListObject)RequestOptions)InvoiceLineItemListParams)InvoiceLineItemUpdateParamsc                   @   s   e Z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ed ded ddf
ddZ		ddededed ded ddf
ddZdS )InvoiceLineItemServiceNinvoiceparamsr
   optionsr	   returnListObject[InvoiceLineItem]c              	   C   s&   t d| jddjt|dd||dS )
        When retrieving an invoice, you'll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
        r   get/v1/invoices/{invoice}/linesr   apibase_addressr   r   r   _requestformatr   selfr   r   r    r   /var/www/snowflake_co_dev_github/snow_flake_back_end_deploy/env/lib/python3.10/site-packages/stripe/_invoice_line_item_service.pylist   s   	zInvoiceLineItemService.listc              	      s.   t d| jddjt|dd||dI dH S )r   r   r   r   r   r   r   Nr   _request_asyncr   r   r   r   r   r   
list_async+   s   	
z!InvoiceLineItemService.list_asyncline_item_idr   r   c              	   C   s,   t d| jddjt|t|dd||dS )  
        Updates an invoice's line item. Some fields, such as tax_amounts, only live on the invoice line item,
        so they can only be updated through this endpoint. Other fields, such as amount, live on both the invoice
        item and the invoice line item, so updates on this endpoint will propagate to the invoice item as well.
        Updating an invoice's line item is only possible before the invoice is finalized.
        r   post+/v1/invoices/{invoice}/lines/{line_item_id}r   r$   r   r   r   r   r   r$   r   r   r   r   r   updateA   s   zInvoiceLineItemService.updatec              	      s4   t d| jddjt|t|dd||dI dH S )r%   r   r&   r'   r(   r   r   Nr!   r)   r   r   r   update_async\   s   
z#InvoiceLineItemService.update_async)NN)	__name__
__module____qualname__strr   r    r#   r*   r+   r   r   r   r   r      sb    


r   N)stripe._stripe_servicer   stripe._utilr   typingr   r   typing_extensionsr   stripe._invoice_line_itemr   stripe._list_objectr   stripe._request_optionsr	   ,stripe.params._invoice_line_item_list_paramsr
   .stripe.params._invoice_line_item_update_paramsr   r   r   r   r   r   <module>   s   